; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.30319.01 

	TITLE	D:\_KAZE\_KAZE_32bit_memmem_showdown\strstr_SHORT-SHOWDOWN_LV_WIKI.c
	.686P
	.XMM
	include listing.inc
	.model	flat

INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES

PUBLIC	_TotalRoughSearchTime
PUBLIC	_Railgunhits
PUBLIC	_GlobalSP
PUBLIC	_GlobalI
_DATA	SEGMENT
COMM	_clocks2:DWORD
COMM	_llTOaDigits3:BYTE:03dH
COMM	_clocks4:DWORD
COMM	_clocks1:DWORD
COMM	_clocks3:DWORD
COMM	_llTOaDigits2:BYTE:03dH
_DATA	ENDS
_BSS	SEGMENT
_TotalRoughSearchTime DQ 01H DUP (?)
_Railgunhits DD	01H DUP (?)
	ALIGN	8

_GlobalSP DQ	01H DUP (?)
_GlobalI DQ	01H DUP (?)
_BSS	ENDS
_DATA	SEGMENT
$SG6316	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG6368	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG6822	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG6942	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7054	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7165	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7309	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7378	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7481	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7785	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7873	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7899	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG7929	DB	'Skip-Performance(bigger-the-better): %d%%, %d skips/iter'
	DB	'ations', 0aH, 00H
$SG8063	DB	'an', 00H, 00H
$SG8064	DB	'an', 00H, 00H
$SG8065	DB	'to', 00H, 00H
$SG8066	DB	'to', 00H, 00H
$SG8067	DB	'TDK', 00H, 00H
	ORG $+3
$SG8068	DB	'TDK', 00H, 00H
	ORG $+3
$SG8069	DB	'the', 00H, 00H
	ORG $+3
$SG8070	DB	'the', 00H, 00H
	ORG $+3
$SG8071	DB	'fast', 00H, 00H
	ORG $+2
$SG8072	DB	'fast', 00H, 00H
	ORG $+2
$SG8073	DB	'easy', 00H, 00H
	ORG $+2
$SG8074	DB	'easy', 00H, 00H
	ORG $+2
$SG8075	DB	'grmbl', 00H, 00H
	ORG $+1
$SG8076	DB	'grmbl', 00H, 00H
	ORG $+1
$SG8077	DB	'email', 00H, 00H
	ORG $+1
$SG8078	DB	'email', 00H, 00H
	ORG $+1
$SG8079	DB	'pasting', 00H, 00H
	ORG $+3
$SG8080	DB	'pasting', 00H, 00H
	ORG $+3
$SG8081	DB	'amazing', 00H, 00H
	ORG $+3
$SG8082	DB	'amazing', 00H, 00H
	ORG $+3
$SG8083	DB	'underdog', 00H, 00H
	ORG $+2
$SG8084	DB	'underdog', 00H, 00H
	ORG $+2
$SG8085	DB	'superdog', 00H, 00H
	ORG $+2
$SG8086	DB	'superdog', 00H, 00H
	ORG $+2
$SG8087	DB	'participants', 00H, 00H
	ORG $+2
$SG8088	DB	'participants', 00H, 00H
	ORG $+2
$SG8089	DB	'skillessness', 00H, 00H
	ORG $+2
$SG8090	DB	'skillessness', 00H, 00H
	ORG $+2
$SG8091	DB	'I should have known', 00H, 00H
	ORG $+3
$SG8092	DB	'I should have known', 00H, 00H
	ORG $+3
$SG8093	DB	'human consciousness', 00H, 00H
	ORG $+3
$SG8094	DB	'human consciousness', 00H, 00H
	ORG $+3
$SG8096	DB	'fast', 00H, 00H
	ORG $+2
$SG8097	DB	'fast', 00H, 00H
	ORG $+2
$SG8098	DB	'from', 00H, 00H
	ORG $+2
$SG8099	DB	'from', 00H, 00H
	ORG $+2
$SG8100	DB	'SR71', 00H, 00H
	ORG $+2
$SG8101	DB	'SR71', 00H, 00H
	ORG $+2
$SG8102	DB	'SONY', 00H, 00H
	ORG $+2
$SG8103	DB	'SONY', 00H, 00H
	ORG $+2
$SG8104	DB	'Lexx', 00H, 00H
	ORG $+2
$SG8105	DB	'Lexx', 00H, 00H
	ORG $+2
$SG8106	DB	'Rabea', 00H, 00H
	ORG $+1
$SG8107	DB	'Rabea', 00H, 00H
	ORG $+1
$SG8108	DB	'makes', 00H, 00H
	ORG $+1
$SG8109	DB	'makes', 00H, 00H
	ORG $+1
$SG8110	DB	'punny', 00H, 00H
	ORG $+1
$SG8111	DB	'punny', 00H, 00H
	ORG $+1
$SG8112	DB	'funny', 00H, 00H
	ORG $+1
$SG8113	DB	'funny', 00H, 00H
	ORG $+1
$SG8114	DB	'Orion', 00H, 00H
	ORG $+1
$SG8115	DB	'Orion', 00H, 00H
	ORG $+1
$SG8116	DB	'lemon', 00H, 00H
	ORG $+1
$SG8117	DB	'lemon', 00H, 00H
	ORG $+1
$SG8118	DB	'Hi-Fi', 00H, 00H
	ORG $+1
$SG8119	DB	'Hi-Fi', 00H, 00H
	ORG $+1
$SG8120	DB	'Tesla', 00H, 00H
	ORG $+1
$SG8121	DB	'Tesla', 00H, 00H
	ORG $+1
$SG8122	DB	'Apache', 00H, 00H
$SG8123	DB	'Apache', 00H, 00H
$SG8124	DB	'monkey', 00H, 00H
$SG8125	DB	'monkey', 00H, 00H
$SG8126	DB	'ramjet', 00H, 00H
$SG8127	DB	'ramjet', 00H, 00H
$SG8128	DB	'fallen', 00H, 00H
$SG8129	DB	'fallen', 00H, 00H
$SG8130	DB	'Albert', 00H, 00H
$SG8131	DB	'Albert', 00H, 00H
$SG8132	DB	'Toshiba', 00H, 00H
	ORG $+3
$SG8133	DB	'Toshiba', 00H, 00H
	ORG $+3
$SG8134	DB	'grammar', 00H, 00H
	ORG $+3
$SG8135	DB	'grammar', 00H, 00H
	ORG $+3
$SG8136	DB	'pharaoh', 00H, 00H
	ORG $+3
$SG8137	DB	'pharaoh', 00H, 00H
	ORG $+3
$SG8138	DB	'decades', 00H, 00H
	ORG $+3
$SG8139	DB	'decades', 00H, 00H
	ORG $+3
$SG8140	DB	'#define', 00H, 00H
	ORG $+3
$SG8141	DB	'#define', 00H, 00H
	ORG $+3
$SG8142	DB	'Delerium', 00H, 00H
	ORG $+2
$SG8143	DB	'Delerium', 00H, 00H
	ORG $+2
$SG8144	DB	'numberly', 00H, 00H
	ORG $+2
$SG8145	DB	'numberly', 00H, 00H
	ORG $+2
$SG8146	DB	'stellify', 00H, 00H
	ORG $+2
$SG8147	DB	'stellify', 00H, 00H
	ORG $+2
$SG8148	DB	'elephant', 00H, 00H
	ORG $+2
$SG8149	DB	'elephant', 00H, 00H
	ORG $+2
$SG8150	DB	'Layalina', 00H, 00H
	ORG $+2
$SG8151	DB	'Layalina', 00H, 00H
	ORG $+2
$SG8152	DB	'Fibonacci', 00H, 00H
	ORG $+1
$SG8153	DB	'Fibonacci', 00H, 00H
	ORG $+1
$SG8154	DB	'profanism', 00H, 00H
	ORG $+1
$SG8155	DB	'profanism', 00H, 00H
	ORG $+1
$SG8156	DB	'butterfly', 00H, 00H
	ORG $+1
$SG8157	DB	'butterfly', 00H, 00H
	ORG $+1
$SG8158	DB	'Beth Ditto', 00H, 00H
$SG8159	DB	'Beth Ditto', 00H, 00H
$SG8160	DB	'Got Nuffin', 00H, 00H
$SG8161	DB	'Got Nuffin', 00H, 00H
$SG8162	DB	'fly fly fly', 00H, 00H
	ORG $+3
$SG8163	DB	'fly fly fly', 00H, 00H
	ORG $+3
$SG8164	DB	'quintillion', 00H, 00H
	ORG $+3
$SG8165	DB	'quintillion', 00H, 00H
	ORG $+3
$SG8166	DB	'Sick Of Love', 00H, 00H
	ORG $+2
$SG8167	DB	'Sick Of Love', 00H, 00H
	ORG $+2
$SG8168	DB	'Love Lockdown', 00H, 00H
	ORG $+1
$SG8169	DB	'Love Lockdown', 00H, 00H
	ORG $+1
$SG8170	DB	'Dannii Minogue', 00H, 00H
$SG8171	DB	'Dannii Minogue', 00H, 00H
$SG8172	DB	'299,792,458 m/s', 00H, 00H
	ORG $+3
$SG8173	DB	'299,792,458 m/s', 00H, 00H
	ORG $+3
$SG8174	DB	'Extreme-Fidelity', 00H, 00H
	ORG $+2
$SG8175	DB	'Extreme-Fidelity', 00H, 00H
	ORG $+2
$SG8176	DB	'I should have known', 00H, 00H
	ORG $+3
$SG8177	DB	'I should have known', 00H, 00H
	ORG $+3
$SG8178	DB	'human consciousness', 00H, 00H
	ORG $+3
$SG8179	DB	'human consciousness', 00H, 00H
	ORG $+3
$SG8180	DB	'Truth''s your only fear', 00H, 00H
$SG8181	DB	'Truth''s your only fear', 00H, 00H
$SG8182	DB	'Never thought I''d do it', 00H, 00H
	ORG $+3
$SG8183	DB	'Never thought I''d do it', 00H, 00H
	ORG $+3
$SG8184	DB	'innocence over fading fast', 00H, 00H
$SG8185	DB	'innocence over fading fast', 00H, 00H
$SG8186	DB	'I hit the ground runnin'' free', 00H, 00H
	ORG $+1
$SG8187	DB	'I hit the ground runnin'' free', 00H, 00H
	ORG $+1
$SG8188	DB	'I colour out the darkest clouds', 00H, 00H
	ORG $+3
$SG8189	DB	'I colour out the darkest clouds', 00H, 00H
	ORG $+3
$SG8190	DB	'But he''s looking right through me', 00H, 00H
	ORG $+1
$SG8191	DB	'But he''s looking right through me', 00H, 00H
	ORG $+1
$SG8192	DB	'I''m living in an age that calls darkness light', 00H, 00H
$SG8193	DB	'I''m living in an age that calls darkness light', 00H, 00H
$SG8194	DB	'Following the wanderings of a dream - a dream that keeps'
	DB	' my soul alive', 00H, 00H
$SG8195	DB	'Following the wanderings of a dream - a dream that keeps'
	DB	' my soul alive', 00H, 00H
$SG8196	DB	'I notice what matters and I got nothing to lose but dark'
	DB	'ness and shadows', 00H, 00H
	ORG $+2
$SG8201	DB	'you have read', 00H, 00H
	ORG $+1
$SG8203	DB	'you should have', 00H, 00H
	ORG $+3
$SG8197	DB	'I notice what matters and I got nothing to lose but dark'
	DB	'ness and shadows', 00H, 00H
	ORG $+2
$SG8202	DB	'you have read', 00H, 00H
	ORG $+1
$SG8204	DB	'you should have', 00H, 00H
	ORG $+3
$SG8198	DB	'Then, singing among the savage branches, it impales itse'
	DB	'lf upon the longest, sharpest spine. And, dying, it rises abo'
	DB	've its own agony to outcarol the lark and the nightingale.', 00H
	DB	00H
	ORG $+3
$SG8205	DB	'If you have read', 00H, 00H
	ORG $+2
$SG8199	DB	'Then, singing among the savage branches, it impales itse'
	DB	'lf upon the longest, sharpest spine. And, dying, it rises abo'
	DB	've its own agony to outcarol the lark and the nightingale.', 00H
	DB	00H
	ORG $+3
$SG8206	DB	'If you have read', 00H, 00H
	ORG $+2
$SG8207	DB	'ideas and vision', 00H, 00H
	ORG $+2
$SG8208	DB	'ideas and vision', 00H, 00H
	ORG $+2
$SG8209	DB	'have read through', 00H, 00H
	ORG $+1
$SG8210	DB	'have read through', 00H, 00H
	ORG $+1
$SG8211	DB	'preceding chapters', 00H, 00H
$SG8212	DB	'preceding chapters', 00H, 00H
$SG8213	DB	'a pretty good idea', 00H, 00H
$SG8214	DB	'a pretty good idea', 00H, 00H
$SG8215	DB	'and its techniques', 00H, 00H
$SG8216	DB	'and its techniques', 00H, 00H
$SG8217	DB	'idea on how to make', 00H, 00H
	ORG $+3
$SG8218	DB	'idea on how to make', 00H, 00H
	ORG $+3
$SG8219	DB	'is the largest ever', 00H, 00H
	ORG $+3
$SG8220	DB	'is the largest ever', 00H, 00H
	ORG $+3
$SG8221	DB	'The purpose of this', 00H, 00H
	ORG $+3
$SG8222	DB	'The purpose of this', 00H, 00H
	ORG $+3
$SG8223	DB	'electronic repository', 00H, 00H
	ORG $+1
$SG8224	DB	'electronic repository', 00H, 00H
	ORG $+1
$SG8225	DB	'much more, a complete,', 00H, 00H
$SG8226	DB	'much more, a complete,', 00H, 00H
$SG8227	DB	'many people as possible', 00H, 00H
	ORG $+3
$SG8228	DB	'many people as possible', 00H, 00H
	ORG $+3
$SG8229	DB	'understanding and knowledge', 00H, 00H
	ORG $+3
$SG8230	DB	'understanding and knowledge', 00H, 00H
	ORG $+3
$SG8231	DB	'and to make them available to as', 00H, 00H
	ORG $+2
$SG8232	DB	'and to make them available to as', 00H, 00H
	ORG $+2
$SG8233	DB	'What use you will put it to is up to you.', 00H, 00H
	ORG $+1
$SG8234	DB	'What use you will put it to is up to you.', 00H, 00H
	ORG $+1
$SG8235	DB	'CD-ROM is to provide access to Osho''s words', 00H, 00H
	ORG $+3
$SG8236	DB	'CD-ROM is to provide access to Osho''s words', 00H, 00H
	ORG $+3
$SG8237	DB	'world view of the New Man and a new way of life', 00H, 00H
	ORG $+3
$SG8238	DB	'world view of the New Man and a new way of life', 00H, 00H
	ORG $+3
$SG8239	DB	'TGAGCACATTGAGAGCCTCCAAGGCATGGAGT', 00H, 00H
	ORG $+2
$SG8240	DB	'TGAGCACATTGAGAGCCTCCAAGGCATGGAGT', 00H, 00H
	ORG $+2
$SG8241	DB	'TTGAGAGCCTCCAAGGCATGGAGT', 00H, 00H
	ORG $+2
$SG8242	DB	'TTGAGAGCCTCCAAGGCATGGAGT', 00H, 00H
	ORG $+2
$SG8243	DB	'AGCCTCCAAGGCATGGAGT', 00H, 00H
	ORG $+3
$SG8244	DB	'AGCCTCCAAGGCATGGAGT', 00H, 00H
	ORG $+3
$SG8245	DB	'CCAAGGCATGGAGT', 00H, 00H
$SG8246	DB	'CCAAGGCATGGAGT', 00H, 00H
$SG8247	DB	'AAGGCATGGAGT', 00H, 00H
	ORG $+2
$SG8248	DB	'AAGGCATGGAGT', 00H, 00H
	ORG $+2
$SG8249	DB	'Premium Full Leaf Tea', 00H, 00H
	ORG $+1
$SG8250	DB	'Premium Full Leaf Tea', 00H, 00H
	ORG $+1
$SG8253	DB	'strstr_SHORT-SHOWDOWN, revision Doublet_8Triplet_7Triden'
	DB	't_7Hasherezade_vs_7Gulliver2_vs_7Elsiane_vs_7sun_vs_7_vs_7sun'
	DB	'horse_vs_7deuce_vs_BMF, written by Kaze.', 0aH, 00H
	ORG $+1
$SG8254	DB	'Full credits to: R.S. Boyer, J.S. Moore, R.N. Horspool, '
	DB	'D.M. Sunday.', 0aH, 00H
	ORG $+2
$SG8255	DB	'Usage: strstr_SHORT-SHOWDOWN.exe [anystring] [anystring]'
	DB	0aH, 00H
	ORG $+2
$SG8256	DB	'Example1(keyboard test): strstr_SHORT-SHOWDOWN.exe', 0aH
	DB	00H
$SG8257	DB	'Example2(DUMBO 8x2 test): strstr_SHORT-SHOWDOWN.exe go', 0aH
	DB	00H
$SG8258	DB	'Example3(6x2 and 52 tests): strstr_SHORT-SHOWDOWN.exe go'
	DB	' go', 0aH, 00H
	ORG $+3
$SG8262	DB	'strstr_SHORT-SHOWDOWN: Needed memory allocation denied!', 0aH
	DB	00H
	ORG $+3
$SG8265	DB	'rb', 00H
	ORG $+1
$SG8266	DB	'enwiki-20130904-pages-articles.7z.001', 00H
	ORG $+2
$SG8267	DB	'strstr_SHORT-SHOWDOWN: Can''t open ''OSHO.TXT'' file.', 0aH
	DB	00H
$SG8274	DB	0aH, 'Last 6 lines of ''OSHO.TXT'' file 197 MB (206,908,9'
	DB	'49 bytes):', 0aH, 00H
	ORG $+2
$SG8284	DB	'GGGGTGCCTGAAGTT', 0aH, 00H
	ORG $+3
$SG8275	DB	'           If you have read through the preceding chapte'
	DB	'rs you should have a pretty good idea on how to make', 0aH, 00H
	ORG $+2
$SG8276	DB	'           use of the Osho Books on CD-ROM. What use you'
	DB	' will put it to is up to you. It is the largest ever', 0aH, 00H
	ORG $+2
$SG8277	DB	'           electronic repository of understanding and kn'
	DB	'owledge on meditation and its techniques. It is also', 0aH, 00H
	ORG $+2
$SG8278	DB	'           much more, a complete, world view of the New '
	DB	'Man and a new way of life. The purpose of this', 0aH, 00H
$SG8279	DB	'           CD-ROM is to provide access to Osho''s words,'
	DB	' ideas and vision, and to make them available to as', 0aH, 00H
$SG8280	DB	'           many people as possible.', 0aH, 00H
	ORG $+3
$SG8285	DB	0aH, 'Input Pattern(up to 19+2000 chars): ', 00H
	ORG $+2
$SG8298	DB	'Railgun_Quadruplet_7Gulliver performance: %luKB/clock', 0aH
	DB	00H
	ORG $+1
$SG8311	DB	'Railgun_Hasherezade_O4_BIT_14bit performance: %luKB/cloc'
	DB	'k', 0aH, 00H
	ORG $+1
$SG8281	DB	0aH, 'Last 3 lines of ''hs_alt_HuRef_chr1.fa'' file 212 M'
	DB	'B (222,610,477 bytes):', 0aH, 00H
	ORG $+2
$SG8324	DB	'Railgun_Hasherezade_O8_BYTE_14bit performance: %luKB/clo'
	DB	'ck', 0aH, 00H
$SG8282	DB	'AGATTTTAAAGATTTTCTTTTTTTTTGACATAGAATCTTATGGAGGCTGAGAAATA'
	DB	'ATTTTTTTTCTATT', 0aH, 00H
$SG8283	DB	'TTATTCTTCAGCCCCAGGTGTTTGCTTTTGCAGATTCTTGAGCACATTGAGAGCCT'
	DB	'CCAAGGCATGGAGT', 0aH, 00H
$SG8286	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8335	DB	'volnitsky2_hits/volnitsky2_clocks: %lu/%lu', 0aH, 00H
$SG8287	DB	'WARNING! The next line works with BMH only for pattern 4'
	DB	'[+] long, otherwise (for 2 and 3) other searcher takes over!', 0aH
	DB	00H
	ORG $+2
$SG8294	DB	'The first instance occurred at position %d within next l'
	DB	'ine:', 0aH, '%s', 0aH, 00H
	ORG $+3
$SG8348	DB	'volnitsky4_hits/volnitsky4_clocks: %lu/%lu', 0aH, 00H
$SG8296	DB	'Railgun_Quadruplet_7Gulliver_hits/Railgun_Quadruplet_7Gu'
	DB	'lliver_clocks: %lu/%lu', 0aH, 00H
$SG8299	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8358	DB	'Railgun_Quadruplet_7sun performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8300	DB	'WARNING! The next line works with BMH only for pattern 4'
	DB	'[+] long, otherwise (for 2 and 3) other searcher takes over!', 0aH
	DB	00H
	ORG $+2
$SG8307	DB	'The first instance occurred at position %d within next l'
	DB	'ine:', 0aH, '%s', 0aH, 00H
	ORG $+3
$SG8366	DB	'Railgun_Quadruplet_7 performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8382	DB	'BNDM_32 performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8309	DB	'Railgun_Hasherezade_O4_BIT_14bit_hits/Railgun_Hasherezad'
	DB	'e_O4_BIT_14bit_clocks: %lu/%lu', 0aH, 00H
$SG8312	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8374	DB	'Railgun_Quadruplet_7Trident performance: %luKB/clock', 0aH
	DB	00H
	ORG $+2
$SG8390	DB	'Railgun_Quadruplet_7sunhorse performance: %luKB/clock', 0aH
	DB	00H
	ORG $+1
$SG8398	DB	'Railgun_Quadruplet_7deuce performance: %luKB/clock', 0aH
	DB	00H
$SG8313	DB	'WARNING! The next line works with BMH only for pattern 4'
	DB	'[+] long, otherwise (for 2 and 3) other searcher takes over!', 0aH
	DB	00H
	ORG $+2
$SG8320	DB	'The first instance occurred at position %d within next l'
	DB	'ine:', 0aH, '%s', 0aH, 00H
	ORG $+3
$SG8380	DB	'BNDM_32_hits/BNDM_32_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8414	DB	'Railgun_Quadruplet_7Gulliver performance: %luKB/clock', 0aH
	DB	00H
	ORG $+1
$SG8422	DB	'Railgun_Quadruplet_7Hasherezade performance: %luKB/clock'
	DB	0aH, 00H
	ORG $+2
$SG8322	DB	'Railgun_Hasherezade_O8_BYTE_14bit_hits/Railgun_Hashereza'
	DB	'de_O8_BYTE_14bit_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8430	DB	'Boyer_Moore_Flensburg performance: %luKB/clock', 0aH, 00H
$SG8438	DB	'Two-Way performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8325	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8406	DB	'Railgun_Quadruplet_7Elsiane performance: %luKB/clock', 0aH
	DB	00H
	ORG $+2
$SG8446	DB	'TW_hits/TW_clocks: %lu/%lu', 0aH, 00H
$SG8326	DB	'WARNING! The next line works with BMH only for pattern 4'
	DB	'[+] long, otherwise (for 2 and 3) other searcher takes over!', 0aH
	DB	00H
	ORG $+2
$SG8333	DB	'The first instance occurred at position %d within next l'
	DB	'ine:', 0aH, '%s', 0aH, 00H
	ORG $+3
$SG8337	DB	'volnitsky2 performance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG8436	DB	'Two-Way_hits/Two-Way_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8464	DB	'Railgun performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8338	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8454	DB	'BM_HORSPOOL_hits/BM_HORSPOOL_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8482	DB	'Railgun_Quadruplet_7deuce performance: %luKB/clock', 0aH
	DB	00H
$SG8339	DB	'WARNING! The next line works with BMH only for pattern 4'
	DB	'[+] long, otherwise (for 2 and 3) other searcher takes over!', 0aH
	DB	00H
	ORG $+2
$SG8346	DB	'The first instance occurred at position %d within next l'
	DB	'ine:', 0aH, '%s', 0aH, 00H
	ORG $+3
$SG8350	DB	'volnitsky4 performance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG8456	DB	'BM_HORSPOOL performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8491	DB	'Railgun_Quadruplet_7 performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8529	DB	'ReallyTraversed: %s bytes', 0aH, 00H
	ORG $+1
$SG8351	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8462	DB	'Railgun_hits/Railgun_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8566	DB	'ReallyTraversed: %s bytes', 0aH, 00H
	ORG $+1
$SG8356	DB	'Railgun_Quadruplet_7sun_hits/Railgun_Quadruplet_7sun_clo'
	DB	'cks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8359	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8471	DB	'Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8591	DB	'TotalRoughSearchTime: %s clocks', 0aH, 00H
	ORG $+3
$SG8364	DB	'Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %'
	DB	'lu/%lu', 0aH, 00H
$SG8367	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8473	DB	'Railgun_6pp performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8592	DB	'ReallyTraversed: %s bytes', 0aH, 00H
	ORG $+1
$SG8372	DB	'Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Tri'
	DB	'dent_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8375	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8615	DB	'Railgun_Quadruplet_7 52 i.e. average performance: %luKB/'
	DB	'clock', 0aH, 00H
	ORG $+1
$SG8616	DB	'TotalRoughSearchTime: %s clocks', 0aH, 00H
	ORG $+3
$SG8383	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8617	DB	'ReallyTraversed: %s bytes', 0aH, 00H
	ORG $+1
$SG8388	DB	'Railgun_Quadruplet_7sunhorse_hits/Railgun_Quadruplet_7su'
	DB	'nhorse_clocks: %lu/%lu', 0aH, 00H
$SG8391	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8629	DB	'Found (''%s'') %d time(s), BM_HORSPOOL performance: %luK'
	DB	'B/clock', 0aH, 00H
	ORG $+1
$SG8695	DB	'Found (''%s'') %d time(s), BNDM_32 performance: %luKB/cl'
	DB	'ock', 0aH, 00H
	ORG $+1
$SG8396	DB	'Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce'
	DB	'_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8632	DB	'Found (''%s'') %d time(s), BM_HORSPOOL performance: %luK'
	DB	'B/clock', 0aH, 00H
	ORG $+1
$SG8698	DB	'Found (''%s'') %d time(s), BNDM_32 performance: %luKB/cl'
	DB	'ock', 0aH, 00H
	ORG $+1
$SG8399	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8635	DB	'BM_HORSPOOL 8x2 i.e. average performance: %luKB/clock', 0aH
	DB	00H
	ORG $+1
$SG8701	DB	'BNDM_32 6x2 i.e. average performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8404	DB	'Railgun_Quadruplet_7Elsiane_hits/Railgun_Quadruplet_7Els'
	DB	'iane_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8407	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8645	DB	'Found (''%s'') %d time(s), Railgun_6pp performance: %luK'
	DB	'B/clock', 0aH, 00H
	ORG $+1
$SG8702	DB	'BNDM_32 6x2 total Skip-Performance/Iterations: %llu/%llu'
	DB	0aH, 00H
	ORG $+2
$SG8412	DB	'Railgun_Quadruplet_7Gulliver_hits/Railgun_Quadruplet_7Gu'
	DB	'lliver_clocks: %lu/%lu', 0aH, 00H
$SG8415	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8648	DB	'Found (''%s'') %d time(s), Railgun_6pp performance: %luK'
	DB	'B/clock', 0aH, 00H
	ORG $+1
$SG8842	DB	'Found (''%s'') %d time(s), BNDM performance: %luKB/clock'
	DB	0aH, 00H
$SG8999	DB	'Brute_Force_Dummy 52 i.e. average performance: %luKB/clo'
	DB	'ck', 0aH, 00H
$SG8420	DB	'Railgun_Quadruplet_7Hasherezade_hits/Railgun_Quadruplet_'
	DB	'7Hasherezade_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8423	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8651	DB	'Railgun_6pp 8x2 i.e. average performance: %luKB/clock', 0aH
	DB	00H
	ORG $+1
$SG9019	DB	'strstr_Microsoft_hits/strstr_Microsoft_clocks: %lu/%lu', 0aH
	DB	00H
$SG9021	DB	'strstr_Microsoft performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8428	DB	'Boyer_Moore_Flensburg_hits/Boyer_Moore_Flensburg_clocks:'
	DB	' %lu/%lu', 0aH, 00H
	ORG $+2
$SG8845	DB	'BNDM 25 i.e. average performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG9060	DB	'Railgun_Doublet performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8431	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8846	DB	'BNDM 25 total Skip-Performance/Iterations: %llu/%llu', 0aH
	DB	00H
	ORG $+2
$SG8915	DB	'Railgun_Quadruplet_7 52 i.e. average performance: %luKB/'
	DB	'clock', 0aH, 00H
	ORG $+1
$SG9078	DB	'Railgun_Quadruplet_hits/Railgun_Quadruplet_clocks: %lu/%'
	DB	'lu', 0aH, 00H
$SG8441	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG8448	DB	'TW performance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG9017	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9140	DB	'BNDM_32 performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8449	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG9022	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9036	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9160	DB	'KarpRabinKaze_BOOSTED performance: %luKB/clock', 0aH, 00H
$SG9178	DB	'KarpRabinKaze_hits/KarpRabinKaze_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG8457	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG9040	DB	'strstr_GNU_C_Library performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG9180	DB	'KarpRabinKaze performance: %luKB/clock', 0aH, 00H
$SG9197	DB	'Karp_Rabin_hits/Karp_Rabin_clocks: %lu/%lu', 0aH, 00H
$SG8465	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG9041	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9056	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9217	DB	'Brute_Force_Dummy_hits/Brute_Force_Dummy_clocks: %lu/%lu'
	DB	0aH, 00H
	ORG $+2
$SG8466	DB	'WARNING! The next line works with BMH only for pattern 4'
	DB	'[+] long, otherwise (for 2 and 3) other searcher takes over!', 0aH
	DB	00H
	ORG $+2
$SG8474	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG9058	DB	'Railgun_Doublet_hits/Railgun_Doublet_clocks: %lu/%lu', 0aH
	DB	00H
	ORG $+2
$SG9076	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9219	DB	'Brute_Force_Dummy performance: %luKB/clock', 0aH, 00H
$SG8475	DB	'WARNING! The next line works with BMH only for pattern 4'
	DB	'[+] long, otherwise (for 2 and 3) other searcher takes over!', 0aH
	DB	00H
	ORG $+2
$SG8480	DB	'Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce'
	DB	'_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG9096	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9257	DB	'Boyer_Moore_Horspool_Kaze performance: %luKB/clock', 0aH
	DB	00H
$SG8483	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) as-one-line ...', 0aH, 00H
	ORG $+3
$SG9061	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9100	DB	'Railgun_Quadruplet_7 performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG9260	DB	0aH, 'DUMBO 8x2 ...', 0aH, 00H
$SG9286	DB	'strstr_Microsoft performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8484	DB	'WARNING! The next line works with BMH only for pattern 4'
	DB	'[+] long, otherwise (for 2 and 3) other searcher takes over!', 0aH
	DB	00H
	ORG $+2
$SG8489	DB	'Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %'
	DB	'lu/%lu', 0aH, 00H
$SG8492	DB	0aH, 'Note: Executing the next two tests 256 times i.e. t'
	DB	'he search is for 256x8x2 patterns!', 0aH, 00H
$SG8493	DB	0aH, 'Doing Search for 8x2 Patterns into String(%dbytes) '
	DB	'as-one-line ... Not-Counting-Hits-Just-Returns-First-One', 0aH
	DB	00H
	ORG $+2
$SG8509	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_6pp pe'
	DB	'rformance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8512	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_6pp pe'
	DB	'rformance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8522	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_6pp pe'
	DB	'rformance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8525	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_6pp pe'
	DB	'rformance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8528	DB	'Railgun_Quadruplet_6pp 8x2 i.e. average performance: %lu'
	DB	'KB/clock', 0aH, 00H
	ORG $+2
$SG9116	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9284	DB	'strstr_Microsoft_hits/strstr_Microsoft_clocks: %lu/%lu', 0aH
	DB	00H
$SG9325	DB	'Railgun_Doublet performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8530	DB	0aH, 'Doing Search for 8x2 Patterns into String(%dbytes) '
	DB	'as-one-line ... Not-Counting-Hits-Just-Returns-First-One', 0aH
	DB	00H
	ORG $+2
$SG8546	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_7 perf'
	DB	'ormance: %luKB/clock', 0aH, 00H
$SG9343	DB	'Railgun_Quadruplet_hits/Railgun_Quadruplet_clocks: %lu/%'
	DB	'lu', 0aH, 00H
$SG8549	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_7 perf'
	DB	'ormance: %luKB/clock', 0aH, 00H
$SG9365	DB	'Railgun_Quadruplet_6pp performance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG8559	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_7 perf'
	DB	'ormance: %luKB/clock', 0aH, 00H
$SG9425	DB	'Railgun_Mischa_8Triplet performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8562	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_7 perf'
	DB	'ormance: %luKB/clock', 0aH, 00H
$SG9445	DB	'BNDM_32 performance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8565	DB	'Railgun_Quadruplet_7 8x2 i.e. average performance: %luKB'
	DB	'/clock', 0aH, 00H
$SG8567	DB	0aH, 'Note: Executing the next two tests 256 times i.e. t'
	DB	'he search is for 256x52 patterns, all utilizing BMH!', 0aH, 00H
	ORG $+2
$SG9136	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+5
$SG8568	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ... Not-Counting-Hits-Just-Returns-First-One', 0aH
	DB	00H
	ORG $+3
$SG8584	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_6pp pe'
	DB	'rformance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8587	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_6pp pe'
	DB	'rformance: %luKB/clock', 0aH, 00H
	ORG $+2
$SG8590	DB	'Railgun_Quadruplet_6pp 52 i.e. average performance: %luK'
	DB	'B/clock', 0aH, 00H
	ORG $+7
$SG8593	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ... Not-Counting-Hits-Just-Returns-First-One', 0aH
	DB	00H
	ORG $+3
$SG8609	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_7 perf'
	DB	'ormance: %luKB/clock', 0aH, 00H
	ORG $+4
$SG8612	DB	'Found (''%s'') at %d position, Railgun_Quadruplet_7 perf'
	DB	'ormance: %luKB/clock', 0aH, 00H
	ORG $+4
$SG8620	DB	0aH, 'Doing Search for 8x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8636	DB	0aH, 'Doing Search for 8x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8652	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8661	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7sun perfo'
	DB	'rmance: %luKB/clock', 0aH, 00H
	ORG $+5
$SG8664	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7sun perfo'
	DB	'rmance: %luKB/clock', 0aH, 00H
	ORG $+5
$SG8667	DB	'Railgun_Quadruplet_7sun 6x2 i.e. average performance: %l'
	DB	'uKB/clock', 0aH, 00H
	ORG $+5
$SG8668	DB	'Railgun_Quadruplet_7sun 6x2 total Skip-Performance/Itera'
	DB	'tions: %llu/%llu', 0aH, 00H
	ORG $+6
$SG8669	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8678	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7 performa'
	DB	'nce: %luKB/clock', 0aH, 00H
$SG8681	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7 performa'
	DB	'nce: %luKB/clock', 0aH, 00H
$SG8684	DB	'Railgun_Quadruplet_7 6x2 i.e. average performance: %luKB'
	DB	'/clock', 0aH, 00H
$SG8685	DB	'Railgun_Quadruplet_7 6x2 total Skip-Performance/Iteratio'
	DB	'ns: %llu/%llu', 0aH, 00H
	ORG $+1
$SG8686	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8703	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8712	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7sunhorse '
	DB	'performance: %luKB/clock', 0aH, 00H
$SG8715	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7sunhorse '
	DB	'performance: %luKB/clock', 0aH, 00H
$SG8718	DB	'Railgun_Quadruplet_7sunhorse 6x2 i.e. average performanc'
	DB	'e: %luKB/clock', 0aH, 00H
$SG8719	DB	'Railgun_Quadruplet_7sunhorse 6x2 total Skip-Performance/'
	DB	'Iterations: %llu/%llu', 0aH, 00H
	ORG $+1
$SG8720	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8729	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7deuce per'
	DB	'formance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG8732	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7deuce per'
	DB	'formance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG8735	DB	'Railgun_Quadruplet_7deuce 6x2 i.e. average performance: '
	DB	'%luKB/clock', 0aH, 00H
	ORG $+3
$SG8736	DB	'Railgun_Quadruplet_7deuce 6x2 total Skip-Performance/Ite'
	DB	'rations: %llu/%llu', 0aH, 00H
	ORG $+4
$SG8737	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8746	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Elsiane p'
	DB	'erformance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8749	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Elsiane p'
	DB	'erformance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8752	DB	'Railgun_Quadruplet_7Elsiane 6x2 i.e. average performance'
	DB	': %luKB/clock', 0aH, 00H
	ORG $+1
$SG8753	DB	'Railgun_Quadruplet_7Elsiane 6x2 total Skip-Performance/I'
	DB	'terations: %llu/%llu', 0aH, 00H
	ORG $+2
$SG8754	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8763	DB	'Found (''%s'') %d time(s), Boyer_Moore_Flensburg perform'
	DB	'ance: %luKB/clock', 0aH, 00H
	ORG $+7
$SG8766	DB	'Found (''%s'') %d time(s), Boyer_Moore_Flensburg perform'
	DB	'ance: %luKB/clock', 0aH, 00H
	ORG $+7
$SG8769	DB	'Boyer_Moore_Flensburg 6x2 i.e. average performance: %luK'
	DB	'B/clock', 0aH, 00H
	ORG $+7
$SG8770	DB	'Boyer_Moore_Flensburg 6x2 total Skip-Performance/Iterati'
	DB	'ons: %llu/%llu', 0aH, 00H
$SG8771	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8780	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Gulliver '
	DB	'performance: %luKB/clock', 0aH, 00H
$SG8783	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Gulliver '
	DB	'performance: %luKB/clock', 0aH, 00H
$SG8786	DB	'Railgun_Quadruplet_7Gulliver 6x2 i.e. average performanc'
	DB	'e: %luKB/clock', 0aH, 00H
$SG8787	DB	'Railgun_Quadruplet_7Gulliver 6x2 total Skip-Performance/'
	DB	'Iterations: %llu/%llu', 0aH, 00H
	ORG $+1
$SG8788	DB	0aH, 'Doing Search for 6x2 Patterns into String(%dbytes) '
	DB	'as-one-line ...', 0aH, 00H
	ORG $+3
$SG8797	DB	'Found (''%s'') %d time(s), Brute_Force_Dummy performance'
	DB	': %luKB/clock', 0aH, 00H
	ORG $+3
$SG8800	DB	'Found (''%s'') %d time(s), Brute_Force_Dummy performance'
	DB	': %luKB/clock', 0aH, 00H
	ORG $+3
$SG8803	DB	'Brute_Force_Dummy 6x2 i.e. average performance: %luKB/cl'
	DB	'ock', 0aH, 00H
	ORG $+3
$SG8804	DB	'Brute_Force_Dummy 6x2 total Skip-Performance/Iterations:'
	DB	' %llu/%llu', 0aH, 00H
	ORG $+4
$SG8805	DB	0aH, 'Doing Search for 25 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8814	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7sun perfo'
	DB	'rmance: %luKB/clock', 0aH, 00H
	ORG $+5
$SG8817	DB	'Railgun_Quadruplet_7sun 25 i.e. average performance: %lu'
	DB	'KB/clock', 0aH, 00H
	ORG $+6
$SG8818	DB	'Railgun_Quadruplet_7sun 25 total Skip-Performance/Iterat'
	DB	'ions: %llu/%llu', 0aH, 00H
	ORG $+7
$SG8819	DB	0aH, 'Doing Search for 25 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8828	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Trident p'
	DB	'erformance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8831	DB	'Railgun_Quadruplet_7Trident 25 i.e. average performance:'
	DB	' %luKB/clock', 0aH, 00H
	ORG $+2
$SG8832	DB	'Railgun_Quadruplet_7Trident 25 total Skip-Performance/It'
	DB	'erations: %llu/%llu', 0aH, 00H
	ORG $+3
$SG8833	DB	0aH, 'Doing Search for 25 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8847	DB	0aH, 'Doing Search for 25 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8856	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Elsiane p'
	DB	'erformance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8859	DB	'Railgun_Quadruplet_7Elsiane 25 i.e. average performance:'
	DB	' %luKB/clock', 0aH, 00H
	ORG $+2
$SG8860	DB	'Railgun_Quadruplet_7Elsiane 25 total Skip-Performance/It'
	DB	'erations: %llu/%llu', 0aH, 00H
	ORG $+3
$SG8861	DB	0aH, 'Doing Search for 25 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8870	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Gulliver '
	DB	'performance: %luKB/clock', 0aH, 00H
$SG8873	DB	'Railgun_Quadruplet_7Gulliver 25 i.e. average performance'
	DB	': %luKB/clock', 0aH, 00H
	ORG $+1
$SG8874	DB	'Railgun_Quadruplet_7Gulliver 25 total Skip-Performance/I'
	DB	'terations: %llu/%llu', 0aH, 00H
	ORG $+2
$SG8875	DB	0aH, 'Doing Search for 25 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8884	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Hashereza'
	DB	'de performance: %luKB/clock', 0aH, 00H
	ORG $+5
$SG8887	DB	'Railgun_Quadruplet_7Hasherezade 25 i.e. average performa'
	DB	'nce: %luKB/clock', 0aH, 00H
	ORG $+6
$SG8888	DB	'Railgun_Quadruplet_7Hasherezade 25 total Skip-Performanc'
	DB	'e/Iterations: %llu/%llu', 0aH, 00H
	ORG $+7
$SG8889	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8898	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7sun perfo'
	DB	'rmance: %luKB/clock', 0aH, 00H
	ORG $+5
$SG8901	DB	'Railgun_Quadruplet_7sun 52 i.e. average performance: %lu'
	DB	'KB/clock', 0aH, 00H
	ORG $+6
$SG8902	DB	'Railgun_Quadruplet_7sun 52 total Skip-Performance/Iterat'
	DB	'ions: %llu/%llu', 0aH, 00H
	ORG $+7
$SG8903	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8912	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7 performa'
	DB	'nce: %luKB/clock', 0aH, 00H
$SG8916	DB	'Railgun_Quadruplet_7 52 total Skip-Performance/Iteration'
	DB	's: %llu/%llu', 0aH, 00H
	ORG $+2
$SG8917	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8926	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7sunhorse '
	DB	'performance: %luKB/clock', 0aH, 00H
$SG8929	DB	'Railgun_Quadruplet_7sunhorse 52 i.e. average performance'
	DB	': %luKB/clock', 0aH, 00H
	ORG $+1
$SG8930	DB	'Railgun_Quadruplet_7sunhorse 52 total Skip-Performance/I'
	DB	'terations: %llu/%llu', 0aH, 00H
	ORG $+2
$SG8931	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8940	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7deuce per'
	DB	'formance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG8943	DB	'Railgun_Quadruplet_7deuce 52 i.e. average performance: %'
	DB	'luKB/clock', 0aH, 00H
	ORG $+4
$SG8944	DB	'Railgun_Quadruplet_7deuce 52 total Skip-Performance/Iter'
	DB	'ations: %llu/%llu', 0aH, 00H
	ORG $+5
$SG8945	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8954	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Elsiane p'
	DB	'erformance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG8957	DB	'Railgun_Quadruplet_7Elsiane 52 i.e. average performance:'
	DB	' %luKB/clock', 0aH, 00H
	ORG $+2
$SG8958	DB	'Railgun_Quadruplet_7Elsiane 52 total Skip-Performance/It'
	DB	'erations: %llu/%llu', 0aH, 00H
	ORG $+3
$SG8959	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8968	DB	'Found (''%s'') %d time(s), Boyer_Moore_Flensburg perform'
	DB	'ance: %luKB/clock', 0aH, 00H
	ORG $+7
$SG8971	DB	'Boyer_Moore_Flensburg 52 i.e. average performance: %luKB'
	DB	'/clock', 0aH, 00H
$SG8972	DB	'Boyer_Moore_Flensburg 52 total Skip-Performance/Iteratio'
	DB	'ns: %llu/%llu', 0aH, 00H
	ORG $+1
$SG8973	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8982	DB	'Found (''%s'') %d time(s), Railgun_Quadruplet_7Gulliver '
	DB	'performance: %luKB/clock', 0aH, 00H
$SG8985	DB	'Railgun_Quadruplet_7Gulliver 52 i.e. average performance'
	DB	': %luKB/clock', 0aH, 00H
	ORG $+1
$SG8986	DB	'Railgun_Quadruplet_7Gulliver 52 total Skip-Performance/I'
	DB	'terations: %llu/%llu', 0aH, 00H
	ORG $+2
$SG8987	DB	0aH, 'Doing Search for 52 Patterns into String(%dbytes) a'
	DB	's-one-line ...', 0aH, 00H
	ORG $+4
$SG8996	DB	'Found (''%s'') %d time(s), Brute_Force_Dummy performance'
	DB	': %luKB/clock', 0aH, 00H
	ORG $+3
$SG9000	DB	'Brute_Force_Dummy 52 total Skip-Performance/Iterations: '
	DB	'%llu/%llu', 0aH, 00H
	ORG $+5
$SG9002	DB	0aH, 'Doing Search for Pattern(%dbytes) into String(%dbyt'
	DB	'es) line-by-line ...', 0aH, 00H
	ORG $+6
$SG9038	DB	'strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: %'
	DB	'lu/%lu', 0aH, 00H
$SG9080	DB	'Railgun_Quadruplet performance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG9081	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9098	DB	'Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %'
	DB	'lu/%lu', 0aH, 00H
$SG9101	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9118	DB	'Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Tri'
	DB	'plet_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG9120	DB	'Railgun_Quadruplet_8Triplet performance: %luKB/clock', 0aH
	DB	00H
	ORG $+2
$SG9121	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9138	DB	'BNDM_32_hits/BNDM_32_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG9141	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9156	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9158	DB	'KarpRabinKaze_BOOSTED_hits/KarpRabinKaze_BOOSTED_clocks:'
	DB	' %lu/%lu', 0aH, 00H
	ORG $+2
$SG9161	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9176	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9181	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9195	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9199	DB	'Karp_Rabin performance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG9200	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9215	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9220	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9234	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+5
$SG9236	DB	'Boyer-Moore-Horspool_hits/Boyer-Moore-Horspool_clocks: %'
	DB	'lu/%lu', 0aH, 00H
$SG9238	DB	'Boyer-Moore-Horspool performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG9239	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9253	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9255	DB	'Boyer_Moore_Horspool_Kaze_hits/Boyer_Moore_Horspool_Kaze'
	DB	'_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG9258	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+6
$SG9267	DB	0aH, 'Searching for Pattern(''%s'',%dbytes) into String(%'
	DB	'dbytes) line-by-line ...', 0aH, 0aH, 00H
	ORG $+3
$SG9282	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9287	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9301	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9303	DB	'strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: %'
	DB	'lu/%lu', 0aH, 00H
$SG9305	DB	'strstr_GNU_C_Library performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG9306	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9321	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9323	DB	'Railgun_Doublet_hits/Railgun_Doublet_clocks: %lu/%lu', 0aH
	DB	00H
	ORG $+2
$SG9326	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9341	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9345	DB	'Railgun_Quadruplet performance: %luKB/clock', 0aH, 00H
	ORG $+3
$SG9346	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9361	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9363	DB	'Railgun_Quadruplet_6pp_hits/Railgun_Quadruplet_6pp_clock'
	DB	's: %lu/%lu', 0aH, 00H
$SG9366	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9381	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+5
$SG9383	DB	'Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %'
	DB	'lu/%lu', 0aH, 00H
$SG9385	DB	'Railgun_Quadruplet_7 performance: %luKB/clock', 0aH, 00H
	ORG $+1
$SG9386	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9401	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9403	DB	'Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Tri'
	DB	'plet_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG9405	DB	'Railgun_Quadruplet_8Triplet performance: %luKB/clock', 0aH
	DB	00H
	ORG $+2
$SG9406	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9421	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9423	DB	'Railgun_Mischa_8Triplet_hits/Railgun_Mischa_8Triplet_clo'
	DB	'cks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG9426	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9441	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9443	DB	'BNDM_32_hits/BNDM_32_clocks: %lu/%lu', 0aH, 00H
	ORG $+2
$SG9446	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
	ORG $+2
$SG9461	DB	'LinesEncountered: %lu', 0aH, 00H
	ORG $+1
$SG9463	DB	'Railgun_Quadruplet_7Gulliver_hits/Railgun_Quadruplet_7Gu'
	DB	'lliver_clocks: %lu/%lu', 0aH, 00H
$SG9465	DB	'Railgun_Quadruplet_7Gulliver performance: %luKB/clock', 0aH
	DB	00H
	ORG $+1
$SG9466	DB	'StrnglenTRAVERSED: %lu bytes', 0aH, 00H
_DATA	ENDS
PUBLIC	_x64toaKAZE
EXTRN	__aulldvrm:PROC
; Function compile flags: /Ogtpy
; File d:\_kaze\_kaze_32bit_memmem_showdown\strstr_short-showdown_lv_wiki.c
_TEXT	SEGMENT
tv65 = -8						; size = 8
tv164 = 8						; size = 8
_val$ = 8						; size = 8
_buf$ = 16						; size = 4
_radix$ = 20						; size = 4
_is_neg$ = 24						; size = 4
_x64toaKAZE PROC

; 1994 :             val = (unsigned long long)(-(long long)val);

  00000	8b 44 24 08	 mov	 eax, DWORD PTR _val$[esp]
  00004	83 ec 08	 sub	 esp, 8
  00007	83 7c 24 1c 00	 cmp	 DWORD PTR _is_neg$[esp+4], 0
  0000c	55		 push	 ebp
  0000d	56		 push	 esi
  0000e	8b 74 24 1c	 mov	 esi, DWORD PTR _buf$[esp+12]
  00012	57		 push	 edi
  00013	8b 7c 24 18	 mov	 edi, DWORD PTR _val$[esp+16]
  00017	74 0b		 je	 SHORT $LN9@x64toaKAZE

; 1984 :         char *p;                /* pointer to traverse string */
; 1985 :         char *firstdig;         /* pointer to first digit */
; 1986 :         char temp;              /* temp char */
; 1987 :         unsigned digval;        /* value of digit */
; 1988 : 
; 1989 :         p = buf;
; 1990 : 
; 1991 :         if ( is_neg )
; 1992 :         {
; 1993 :             *p++ = '-';         /* negative, so output '-' and negate */

  00019	c6 06 2d	 mov	 BYTE PTR [esi], 45	; 0000002dH
  0001c	46		 inc	 esi

; 1994 :             val = (unsigned long long)(-(long long)val);

  0001d	f7 df		 neg	 edi
  0001f	83 d0 00	 adc	 eax, 0
  00022	f7 d8		 neg	 eax
$LN9@x64toaKAZE:

; 1995 :         }
; 1996 : 
; 1997 :         firstdig = p;           /* save pointer to first digit */

  00024	8b ee		 mov	 ebp, esi

; 2008 :         } while (val > 0);

  00026	c7 44 24 1c 00
	00 00 00	 mov	 DWORD PTR tv164[esp+20], 0
  0002e	53		 push	 ebx
  0002f	90		 npad	 1
$LL8@x64toaKAZE:

; 1998 : 
; 1999 :         do {
; 2000 :             digval = (unsigned) (val % radix);

  00030	8b 4c 24 20	 mov	 ecx, DWORD PTR tv164[esp+24]
  00034	51		 push	 ecx
  00035	8b 4c 24 2c	 mov	 ecx, DWORD PTR _radix$[esp+24]
  00039	51		 push	 ecx
  0003a	50		 push	 eax
  0003b	57		 push	 edi
  0003c	e8 00 00 00 00	 call	 __aulldvrm
  00041	8b f8		 mov	 edi, eax
  00043	89 5c 24 14	 mov	 DWORD PTR tv65[esp+28], ebx
  00047	8b c2		 mov	 eax, edx

; 2001 :             val /= radix;       /* get next digit */
; 2002 : 
; 2003 :             /* convert to ascii and store */
; 2004 :             if (digval > 9)

  00049	83 f9 09	 cmp	 ecx, 9
  0004c	76 05		 jbe	 SHORT $LN5@x64toaKAZE

; 2005 :                 *p++ = (char) (digval - 10 + 'a');  /* a letter */

  0004e	80 c1 57	 add	 cl, 87			; 00000057H

; 2006 :             else

  00051	eb 03		 jmp	 SHORT $LN17@x64toaKAZE
$LN5@x64toaKAZE:

; 2007 :                 *p++ = (char) (digval + '0');       /* a digit */

  00053	80 c1 30	 add	 cl, 48			; 00000030H
$LN17@x64toaKAZE:
  00056	88 0e		 mov	 BYTE PTR [esi], cl
  00058	46		 inc	 esi

; 2008 :         } while (val > 0);

  00059	85 c0		 test	 eax, eax
  0005b	77 d3		 ja	 SHORT $LL8@x64toaKAZE
  0005d	72 04		 jb	 SHORT $LN14@x64toaKAZE
  0005f	85 ff		 test	 edi, edi
  00061	75 cd		 jne	 SHORT $LL8@x64toaKAZE
$LN14@x64toaKAZE:

; 2009 : 
; 2010 :         /* We now have the digit of the number in the buffer, but in reverse
; 2011 :            order.  Thus we reverse them now. */
; 2012 : 
; 2013 :         *p-- = '\0';            /* terminate string; p points to last digit */

  00063	c6 06 00	 mov	 BYTE PTR [esi], 0
  00066	4e		 dec	 esi
  00067	5b		 pop	 ebx
$LL3@x64toaKAZE:

; 2014 : 
; 2015 :         do {
; 2016 :             temp = *p;
; 2017 :             *p = *firstdig;

  00068	8a 55 00	 mov	 dl, BYTE PTR [ebp]
  0006b	8a 06		 mov	 al, BYTE PTR [esi]
  0006d	88 16		 mov	 BYTE PTR [esi], dl

; 2018 :             *firstdig = temp;   /* swap *p and *firstdig */

  0006f	88 45 00	 mov	 BYTE PTR [ebp], al

; 2019 :             --p;

  00072	4e		 dec	 esi

; 2020 :             ++firstdig;         /* advance to next two digits */

  00073	45		 inc	 ebp

; 2021 :         } while (firstdig < p); /* repeat until halfway */

  00074	3b ee		 cmp	 ebp, esi
  00076	72 f0		 jb	 SHORT $LL3@x64toaKAZE
  00078	5f		 pop	 edi
  00079	5e		 pop	 esi
  0007a	5d		 pop	 ebp

; 2022 : }

  0007b	83 c4 08	 add	 esp, 8
  0007e	c3		 ret	 0
_x64toaKAZE ENDP
_TEXT	ENDS
PUBLIC	__i64toaKAZE
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_val$ = 8						; size = 8
_buf$ = 16						; size = 4
_radix$ = 20						; size = 4
__i64toaKAZE PROC

; 2033 :         x64toaKAZE((unsigned long long)val, buf, radix, (radix == 10 && val < 0));

  00080	8b 4c 24 10	 mov	 ecx, DWORD PTR _radix$[esp-4]
  00084	8b 54 24 08	 mov	 edx, DWORD PTR _val$[esp]
  00088	56		 push	 esi
  00089	57		 push	 edi
  0008a	8b 7c 24 0c	 mov	 edi, DWORD PTR _val$[esp+4]
  0008e	83 f9 0a	 cmp	 ecx, 10			; 0000000aH
  00091	75 11		 jne	 SHORT $LN3@i64toaKAZE
  00093	85 d2		 test	 edx, edx
  00095	7f 0d		 jg	 SHORT $LN3@i64toaKAZE
  00097	7c 04		 jl	 SHORT $LN5@i64toaKAZE
  00099	85 ff		 test	 edi, edi
  0009b	73 07		 jae	 SHORT $LN3@i64toaKAZE
$LN5@i64toaKAZE:
  0009d	b8 01 00 00 00	 mov	 eax, 1
  000a2	eb 02		 jmp	 SHORT $LN4@i64toaKAZE
$LN3@i64toaKAZE:
  000a4	33 c0		 xor	 eax, eax
$LN4@i64toaKAZE:
  000a6	8b 74 24 14	 mov	 esi, DWORD PTR _buf$[esp+4]
  000aa	50		 push	 eax
  000ab	51		 push	 ecx
  000ac	56		 push	 esi
  000ad	52		 push	 edx
  000ae	57		 push	 edi
  000af	e8 00 00 00 00	 call	 _x64toaKAZE
  000b4	83 c4 14	 add	 esp, 20			; 00000014H
  000b7	5f		 pop	 edi

; 2034 :         return buf;

  000b8	8b c6		 mov	 eax, esi
  000ba	5e		 pop	 esi

; 2035 : }

  000bb	c3		 ret	 0
__i64toaKAZE ENDP
_TEXT	ENDS
PUBLIC	__ui64toaKAZE
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_val$ = 8						; size = 8
_buf$ = 16						; size = 4
_radix$ = 20						; size = 4
__ui64toaKAZE PROC

; 2043 :         x64toaKAZE(val, buf, radix, 0);

  000c0	8b 44 24 10	 mov	 eax, DWORD PTR _radix$[esp-4]
  000c4	8b 4c 24 08	 mov	 ecx, DWORD PTR _val$[esp]
  000c8	8b 54 24 04	 mov	 edx, DWORD PTR _val$[esp-4]
  000cc	56		 push	 esi
  000cd	8b 74 24 10	 mov	 esi, DWORD PTR _buf$[esp]
  000d1	6a 00		 push	 0
  000d3	50		 push	 eax
  000d4	56		 push	 esi
  000d5	51		 push	 ecx
  000d6	52		 push	 edx
  000d7	e8 00 00 00 00	 call	 _x64toaKAZE
  000dc	83 c4 14	 add	 esp, 20			; 00000014H

; 2044 :         return buf;

  000df	8b c6		 mov	 eax, esi
  000e1	5e		 pop	 esi

; 2045 : }

  000e2	c3		 ret	 0
__ui64toaKAZE ENDP
_TEXT	ENDS
PUBLIC	__ui64toaKAZEzerocomma
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_val$ = 8						; size = 8
_buf$ = 16						; size = 4
_radix$ = 20						; size = 4
__ui64toaKAZEzerocomma PROC

; 2053 :                         char *p;
; 2054 :                         char temp;
; 2055 :                         int txpman;
; 2056 :                         int pxnman;
; 2057 :         x64toaKAZE(val, buf, radix, 0);

  000f0	8b 44 24 10	 mov	 eax, DWORD PTR _radix$[esp-4]
  000f4	8b 4c 24 08	 mov	 ecx, DWORD PTR _val$[esp]
  000f8	8b 54 24 04	 mov	 edx, DWORD PTR _val$[esp-4]
  000fc	55		 push	 ebp
  000fd	8b 6c 24 10	 mov	 ebp, DWORD PTR _buf$[esp]
  00101	56		 push	 esi
  00102	57		 push	 edi
  00103	6a 00		 push	 0
  00105	50		 push	 eax
  00106	55		 push	 ebp
  00107	51		 push	 ecx
  00108	52		 push	 edx
  00109	e8 00 00 00 00	 call	 _x64toaKAZE
  0010e	83 c4 14	 add	 esp, 20			; 00000014H

; 2058 :                         p = buf;

  00111	8b f5		 mov	 esi, ebp
$LL10@ui64toaKAZ:

; 2059 :                         do {
; 2060 :                         } while (*++p != '\0');

  00113	46		 inc	 esi
  00114	80 3e 00	 cmp	 BYTE PTR [esi], 0
  00117	75 fa		 jne	 SHORT $LL10@ui64toaKAZ

; 2061 :                         p--; // p points to last digit

  00119	4e		 dec	 esi

; 2062 :                              // buf points to first digit
; 2063 :                         buf[60] = 0;

  0011a	c6 45 3c 00	 mov	 BYTE PTR [ebp+60], 0

; 2064 :                         txpman = 1;

  0011e	b9 01 00 00 00	 mov	 ecx, 1

; 2065 :                         pxnman = 0;

  00123	33 ff		 xor	 edi, edi
  00125	8d 45 3b	 lea	 eax, DWORD PTR [ebp+59]
$LL7@ui64toaKAZ:

; 2066 :                         do
; 2067 :                         { if (buf <= p)
; 2068 :                           { temp = *p;
; 2069 :                             buf[60-txpman] = temp; pxnman++;

  00128	47		 inc	 edi
  00129	3b ee		 cmp	 ebp, esi
  0012b	77 07		 ja	 SHORT $LN4@ui64toaKAZ
  0012d	8a 16		 mov	 dl, BYTE PTR [esi]
  0012f	88 10		 mov	 BYTE PTR [eax], dl

; 2070 :                             p--;

  00131	4e		 dec	 esi

; 2071 :                             if (pxnman % 4 == 0)
; 2072 :                             { txpman++;
; 2073 :                               buf[60-txpman] = (char) (',');
; 2074 :                             }
; 2075 :                           }
; 2076 :                           else

  00132	eb 03		 jmp	 SHORT $LN18@ui64toaKAZ
$LN4@ui64toaKAZ:

; 2077 :                           { buf[60-txpman] = (char) ('0'); pxnman++;

  00134	c6 00 30	 mov	 BYTE PTR [eax], 48	; 00000030H
$LN18@ui64toaKAZ:

; 2078 :                             if (pxnman % 4 == 0)

  00137	8b d7		 mov	 edx, edi
  00139	81 e2 03 00 00
	80		 and	 edx, -2147483645	; 80000003H
  0013f	79 05		 jns	 SHORT $LN16@ui64toaKAZ
  00141	4a		 dec	 edx
  00142	83 ca fc	 or	 edx, -4			; fffffffcH
  00145	42		 inc	 edx
$LN16@ui64toaKAZ:
  00146	75 05		 jne	 SHORT $LN1@ui64toaKAZ

; 2079 :                             { txpman++;

  00148	41		 inc	 ecx
  00149	48		 dec	 eax

; 2080 :                               buf[60-txpman] = (char) (',');

  0014a	c6 00 2c	 mov	 BYTE PTR [eax], 44	; 0000002cH
$LN1@ui64toaKAZ:

; 2081 :                             }
; 2082 :                           }
; 2083 :                           txpman++;

  0014d	41		 inc	 ecx
  0014e	48		 dec	 eax

; 2084 :                         } while (txpman <= 60);

  0014f	83 f9 3c	 cmp	 ecx, 60			; 0000003cH
  00152	7e d4		 jle	 SHORT $LL7@ui64toaKAZ

; 2085 :         return buf;

  00154	5f		 pop	 edi
  00155	5e		 pop	 esi
  00156	8b c5		 mov	 eax, ebp
  00158	5d		 pop	 ebp

; 2086 : }

  00159	c3		 ret	 0
__ui64toaKAZEzerocomma ENDP
_TEXT	ENDS
PUBLIC	__ui64toaKAZEcomma
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_val$ = 8						; size = 8
_buf$ = 16						; size = 4
_radix$ = 20						; size = 4
__ui64toaKAZEcomma PROC

; 2094 :                         char *p;
; 2095 :                         char temp;
; 2096 :                         int txpman;
; 2097 :                         int pxnman;
; 2098 :         x64toaKAZE(val, buf, radix, 0);

  00160	8b 44 24 10	 mov	 eax, DWORD PTR _radix$[esp-4]
  00164	8b 4c 24 08	 mov	 ecx, DWORD PTR _val$[esp]
  00168	8b 54 24 04	 mov	 edx, DWORD PTR _val$[esp-4]
  0016c	53		 push	 ebx
  0016d	8b 5c 24 10	 mov	 ebx, DWORD PTR _buf$[esp]
  00171	55		 push	 ebp
  00172	57		 push	 edi
  00173	6a 00		 push	 0
  00175	50		 push	 eax
  00176	53		 push	 ebx
  00177	51		 push	 ecx
  00178	52		 push	 edx
  00179	e8 00 00 00 00	 call	 _x64toaKAZE
  0017e	83 c4 14	 add	 esp, 20			; 00000014H

; 2099 :                         p = buf;

  00181	8b cb		 mov	 ecx, ebx
$LL6@ui64toaKAZ@2:

; 2100 :                         do {
; 2101 :                         } while (*++p != '\0');

  00183	41		 inc	 ecx
  00184	80 39 00	 cmp	 BYTE PTR [ecx], 0
  00187	75 fa		 jne	 SHORT $LL6@ui64toaKAZ@2

; 2102 :                         p--; // p points to last digit

  00189	49		 dec	 ecx

; 2103 :                              // buf points to first digit
; 2104 :                         buf[26] = 0;
; 2105 :                         txpman = 1;
; 2106 :                         pxnman = 0;

  0018a	33 ff		 xor	 edi, edi
  0018c	c6 43 1a 00	 mov	 BYTE PTR [ebx+26], 0
  00190	bd 01 00 00 00	 mov	 ebp, 1

; 2107 :                         while (buf <= p)

  00195	3b d9		 cmp	 ebx, ecx
  00197	77 34		 ja	 SHORT $LN2@ui64toaKAZ@2

; 2102 :                         p--; // p points to last digit

  00199	56		 push	 esi
  0019a	8d 73 19	 lea	 esi, DWORD PTR [ebx+25]
  0019d	8d 49 00	 npad	 3
$LL3@ui64toaKAZ@2:

; 2108 :                         { temp = *p;
; 2109 :                           buf[26-txpman] = temp; pxnman++;

  001a0	8a 01		 mov	 al, BYTE PTR [ecx]
  001a2	88 06		 mov	 BYTE PTR [esi], al
  001a4	47		 inc	 edi

; 2110 :                           p--;
; 2111 :                           if (pxnman % 3 == 0 && buf <= p)

  001a5	b8 56 55 55 55	 mov	 eax, 1431655766		; 55555556H
  001aa	f7 ef		 imul	 edi
  001ac	8b c2		 mov	 eax, edx
  001ae	c1 e8 1f	 shr	 eax, 31			; 0000001fH
  001b1	03 c2		 add	 eax, edx
  001b3	8d 14 40	 lea	 edx, DWORD PTR [eax+eax*2]
  001b6	8b c7		 mov	 eax, edi
  001b8	49		 dec	 ecx
  001b9	2b c2		 sub	 eax, edx
  001bb	75 09		 jne	 SHORT $LN13@ui64toaKAZ@2
  001bd	3b d9		 cmp	 ebx, ecx
  001bf	77 05		 ja	 SHORT $LN13@ui64toaKAZ@2

; 2112 :                           { txpman++;

  001c1	45		 inc	 ebp
  001c2	4e		 dec	 esi

; 2113 :                             buf[26-txpman] = (char) (',');

  001c3	c6 06 2c	 mov	 BYTE PTR [esi], 44	; 0000002cH
$LN13@ui64toaKAZ@2:

; 2114 :                           }
; 2115 :                           txpman++;

  001c6	45		 inc	 ebp
  001c7	4e		 dec	 esi
  001c8	3b cb		 cmp	 ecx, ebx
  001ca	73 d4		 jae	 SHORT $LL3@ui64toaKAZ@2
  001cc	5e		 pop	 esi
$LN2@ui64toaKAZ@2:

; 2116 :                         } 
; 2117 :         return buf+26-(txpman-1);

  001cd	8b c3		 mov	 eax, ebx
  001cf	5f		 pop	 edi
  001d0	2b c5		 sub	 eax, ebp
  001d2	5d		 pop	 ebp
  001d3	83 c0 1b	 add	 eax, 27			; 0000001bH
  001d6	5b		 pop	 ebx

; 2118 : }

  001d7	c3		 ret	 0
__ui64toaKAZEcomma ENDP
_TEXT	ENDS
PUBLIC	_x$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_HORSPOOL
EXTRN	___security_cookie:DWORD
EXTRN	@__security_check_cookie@4:PROC
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_lastch$ = -1041					; size = 1
_x$GSCopy$ = -1040					; size = 4
$T9518 = -1036						; size = 4
_bm_bc$ = -1032						; size = 1024
__$ArrayPad$ = -4					; size = 4
_y$ = 8							; size = 4
_x$ = 12						; size = 4
_n$ = 16						; size = 4
_m$ = 20						; size = 4
_HORSPOOL PROC

; 2126 :    {

  001e0	55		 push	 ebp
  001e1	8b ec		 mov	 ebp, esp
  001e3	83 e4 f8	 and	 esp, -8			; fffffff8H
  001e6	81 ec 14 04 00
	00		 sub	 esp, 1044		; 00000414H
  001ec	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  001f1	33 c4		 xor	 eax, esp
  001f3	89 84 24 10 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1044], eax

; 2127 :     long i;
; 2128 :     int a, j, bm_bc[ASIZE];
; 2129 :     unsigned char ch, lastch;
; 2130 :    
; 2131 :     /* Preprocessing */
; 2132 :     for (a=0; a < ASIZE; a++) bm_bc[a]=m;

  001fa	8b 45 14	 mov	 eax, DWORD PTR _m$[ebp]
  001fd	53		 push	 ebx
  001fe	8b 5d 0c	 mov	 ebx, DWORD PTR _x$[ebp]
  00201	56		 push	 esi
  00202	57		 push	 edi
  00203	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  00208	8d 7c 24 18	 lea	 edi, DWORD PTR _bm_bc$[esp+1056]
  0020c	f3 ab		 rep stosd

; 2133 :     for (j=0; j < m-1; j++) bm_bc[x[j]]=m-j-1;

  0020e	8d 50 ff	 lea	 edx, DWORD PTR [eax-1]
  00211	33 c9		 xor	 ecx, ecx

; 2143 :        i+=bm_bc[ch];

  00213	89 5c 24 10	 mov	 DWORD PTR _x$GSCopy$[esp+1056], ebx
  00217	85 d2		 test	 edx, edx
  00219	7e 13		 jle	 SHORT $LN5@HORSPOOL

; 2133 :     for (j=0; j < m-1; j++) bm_bc[x[j]]=m-j-1;

  0021b	8b f2		 mov	 esi, edx
  0021d	8d 49 00	 npad	 3
$LL7@HORSPOOL:
  00220	0f be 3c 0b	 movsx	 edi, BYTE PTR [ebx+ecx]
  00224	89 74 bc 18	 mov	 DWORD PTR _bm_bc$[esp+edi*4+1056], esi
  00228	41		 inc	 ecx
  00229	4e		 dec	 esi
  0022a	3b ca		 cmp	 ecx, edx
  0022c	7c f2		 jl	 SHORT $LL7@HORSPOOL
$LN5@HORSPOOL:

; 2134 :    
; 2135 :     /* Searching */
; 2136 :     lastch=x[m-1];

  0022e	8a 4c 03 ff	 mov	 cl, BYTE PTR [ebx+eax-1]
  00232	88 4c 24 0f	 mov	 BYTE PTR _lastch$[esp+1056], cl

; 2137 :     i=0;
; 2138 :     while (i <= n-m) {

  00236	8b 4d 10	 mov	 ecx, DWORD PTR _n$[ebp]
  00239	33 ff		 xor	 edi, edi
  0023b	2b c8		 sub	 ecx, eax
  0023d	89 4c 24 14	 mov	 DWORD PTR $T9518[esp+1056], ecx
  00241	78 6e		 js	 SHORT $LN3@HORSPOOL
  00243	8b 75 08	 mov	 esi, DWORD PTR _y$[ebp]
  00246	8d 4c 06 ff	 lea	 ecx, DWORD PTR [esi+eax-1]
$LN4@HORSPOOL:

; 2139 :        ch=y[i+m-1];
; 2140 :        if (ch ==lastch)

  0024a	8a 54 24 0f	 mov	 dl, BYTE PTR _lastch$[esp+1056]
  0024e	38 14 39	 cmp	 BYTE PTR [ecx+edi], dl
  00251	75 4c		 jne	 SHORT $LN1@HORSPOOL

; 2141 :           //if (memcmp(&y[i],x,m-1) == 0) OUTPUT(i);
; 2142 :           if (memcmp(&y[i],x,m-1) == 0) return(i);

  00253	8d 48 ff	 lea	 ecx, DWORD PTR [eax-1]
  00256	03 f7		 add	 esi, edi
  00258	8b d3		 mov	 edx, ebx
  0025a	83 f9 04	 cmp	 ecx, 4
  0025d	72 15		 jb	 SHORT $LN22@HORSPOOL
  0025f	90		 npad	 1
$LL14@HORSPOOL:
  00260	8b 1e		 mov	 ebx, DWORD PTR [esi]
  00262	3b 1a		 cmp	 ebx, DWORD PTR [edx]
  00264	75 32		 jne	 SHORT $LN27@HORSPOOL
  00266	83 e9 04	 sub	 ecx, 4
  00269	83 c2 04	 add	 edx, 4
  0026c	83 c6 04	 add	 esi, 4
  0026f	83 f9 04	 cmp	 ecx, 4
  00272	73 ec		 jae	 SHORT $LL14@HORSPOOL
$LN22@HORSPOOL:
  00274	85 c9		 test	 ecx, ecx
  00276	74 51		 je	 SHORT $LN16@HORSPOOL
  00278	8a 1a		 mov	 bl, BYTE PTR [edx]
  0027a	3a 1e		 cmp	 bl, BYTE PTR [esi]
  0027c	75 1a		 jne	 SHORT $LN27@HORSPOOL
  0027e	83 f9 01	 cmp	 ecx, 1
  00281	76 46		 jbe	 SHORT $LN16@HORSPOOL
  00283	8a 5a 01	 mov	 bl, BYTE PTR [edx+1]
  00286	3a 5e 01	 cmp	 bl, BYTE PTR [esi+1]
  00289	75 0d		 jne	 SHORT $LN27@HORSPOOL
  0028b	83 f9 02	 cmp	 ecx, 2
  0028e	76 39		 jbe	 SHORT $LN16@HORSPOOL
  00290	8a 4a 02	 mov	 cl, BYTE PTR [edx+2]
  00293	3a 4e 02	 cmp	 cl, BYTE PTR [esi+2]
  00296	74 31		 je	 SHORT $LN16@HORSPOOL
$LN27@HORSPOOL:
  00298	8b 75 08	 mov	 esi, DWORD PTR _y$[ebp]
  0029b	8b 5c 24 10	 mov	 ebx, DWORD PTR _x$GSCopy$[esp+1056]
$LN1@HORSPOOL:

; 2143 :        i+=bm_bc[ch];

  0029f	8d 4c 06 ff	 lea	 ecx, DWORD PTR [esi+eax-1]
  002a3	0f b6 14 39	 movzx	 edx, BYTE PTR [ecx+edi]
  002a7	03 7c 94 18	 add	 edi, DWORD PTR _bm_bc$[esp+edx*4+1056]
  002ab	3b 7c 24 14	 cmp	 edi, DWORD PTR $T9518[esp+1056]
  002af	7e 99		 jle	 SHORT $LN4@HORSPOOL
$LN3@HORSPOOL:

; 2144 :     }
; 2145 :     return(-1);

  002b1	83 c8 ff	 or	 eax, -1

; 2146 :    }

  002b4	5f		 pop	 edi
  002b5	5e		 pop	 esi
  002b6	5b		 pop	 ebx
  002b7	8b 8c 24 10 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1044]
  002be	33 cc		 xor	 ecx, esp
  002c0	e8 00 00 00 00	 call	 @__security_check_cookie@4
  002c5	8b e5		 mov	 esp, ebp
  002c7	5d		 pop	 ebp
  002c8	c3		 ret	 0
$LN16@HORSPOOL:
  002c9	8b 8c 24 1c 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1056]
  002d0	8b c7		 mov	 eax, edi
  002d2	5f		 pop	 edi
  002d3	5e		 pop	 esi
  002d4	5b		 pop	 ebx
  002d5	33 cc		 xor	 ecx, esp
  002d7	e8 00 00 00 00	 call	 @__security_check_cookie@4
  002dc	8b e5		 mov	 esp, ebp
  002de	5d		 pop	 ebp
  002df	c3		 ret	 0
_HORSPOOL ENDP
_TEXT	ENDS
PUBLIC	_x$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_HORSPOOL_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_lastch$ = -1042					; size = 1
_ch$ = -1041						; size = 1
_x$GSCopy$ = -1040					; size = 4
$T9541 = -1036						; size = 4
_bm_bc$ = -1032						; size = 1024
__$ArrayPad$ = -4					; size = 4
_y$ = 8							; size = 4
_x$ = 12						; size = 4
_n$ = 16						; size = 4
_m$ = 20						; size = 4
_HORSPOOL_hits PROC

; 2152 :    {

  002e0	55		 push	 ebp
  002e1	8b ec		 mov	 ebp, esp
  002e3	83 e4 f8	 and	 esp, -8			; fffffff8H
  002e6	81 ec 14 04 00
	00		 sub	 esp, 1044		; 00000414H
  002ec	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  002f1	33 c4		 xor	 eax, esp
  002f3	89 84 24 10 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1044], eax

; 2153 :     long i;
; 2154 :     int a, j, bm_bc[ASIZE];
; 2155 :     unsigned char ch, lastch;
; 2156 :    
; 2157 :     /* Preprocessing */
; 2158 :     for (a=0; a < ASIZE; a++) bm_bc[a]=m;

  002fa	8b 45 14	 mov	 eax, DWORD PTR _m$[ebp]
  002fd	53		 push	 ebx
  002fe	8b 5d 0c	 mov	 ebx, DWORD PTR _x$[ebp]
  00301	56		 push	 esi
  00302	57		 push	 edi
  00303	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  00308	8d 7c 24 18	 lea	 edi, DWORD PTR _bm_bc$[esp+1056]
  0030c	f3 ab		 rep stosd

; 2159 :     for (j=0; j < m-1; j++) bm_bc[x[j]]=m-j-1;

  0030e	8d 50 ff	 lea	 edx, DWORD PTR [eax-1]
  00311	33 c9		 xor	 ecx, ecx

; 2170 :        i+=bm_bc[ch];

  00313	89 5c 24 10	 mov	 DWORD PTR _x$GSCopy$[esp+1056], ebx
  00317	85 d2		 test	 edx, edx
  00319	7e 13		 jle	 SHORT $LN5@HORSPOOL_h

; 2159 :     for (j=0; j < m-1; j++) bm_bc[x[j]]=m-j-1;

  0031b	8b f2		 mov	 esi, edx
  0031d	8d 49 00	 npad	 3
$LL7@HORSPOOL_h:
  00320	0f be 3c 0b	 movsx	 edi, BYTE PTR [ebx+ecx]
  00324	89 74 bc 18	 mov	 DWORD PTR _bm_bc$[esp+edi*4+1056], esi
  00328	41		 inc	 ecx
  00329	4e		 dec	 esi
  0032a	3b ca		 cmp	 ecx, edx
  0032c	7c f2		 jl	 SHORT $LL7@HORSPOOL_h
$LN5@HORSPOOL_h:

; 2160 :    
; 2161 :     /* Searching */
; 2162 :     lastch=x[m-1];

  0032e	8a 4c 03 ff	 mov	 cl, BYTE PTR [ebx+eax-1]
  00332	88 4c 24 0e	 mov	 BYTE PTR _lastch$[esp+1056], cl

; 2163 :     i=0;
; 2164 :     while (i <= n-m) {

  00336	8b 4d 10	 mov	 ecx, DWORD PTR _n$[ebp]
  00339	33 ff		 xor	 edi, edi
  0033b	2b c8		 sub	 ecx, eax
  0033d	89 4c 24 14	 mov	 DWORD PTR $T9541[esp+1056], ecx
  00341	78 7a		 js	 SHORT $LN27@HORSPOOL_h
  00343	eb 04		 jmp	 SHORT $LN33@HORSPOOL_h
$LL31@HORSPOOL_h:
  00345	8b 5c 24 10	 mov	 ebx, DWORD PTR _x$GSCopy$[esp+1056]
$LN33@HORSPOOL_h:
  00349	8b 75 08	 mov	 esi, DWORD PTR _y$[ebp]

; 2165 :        ch=y[i+m-1];

  0034c	8d 4c 06 ff	 lea	 ecx, DWORD PTR [esi+eax-1]
  00350	8a 0c 39	 mov	 cl, BYTE PTR [ecx+edi]
  00353	88 4c 24 0f	 mov	 BYTE PTR _ch$[esp+1056], cl

; 2166 :        if (ch ==lastch)

  00357	3a 4c 24 0e	 cmp	 cl, BYTE PTR _lastch$[esp+1056]
  0035b	75 51		 jne	 SHORT $LN1@HORSPOOL_h

; 2167 :           //if (memcmp(&y[i],x,m-1) == 0) OUTPUT(i);
; 2168 :           //if (memcmp(&y[i],x,m-1) == 0) return(i);
; 2169 :           if (memcmp(&y[i],x,m-1) == 0) Railgunhits++;

  0035d	8d 48 ff	 lea	 ecx, DWORD PTR [eax-1]
  00360	03 f7		 add	 esi, edi
  00362	8b d3		 mov	 edx, ebx
  00364	83 f9 04	 cmp	 ecx, 4
  00367	72 1b		 jb	 SHORT $LN22@HORSPOOL_h
  00369	8d a4 24 00 00
	00 00		 npad	 7
$LL14@HORSPOOL_h:
  00370	8b 1e		 mov	 ebx, DWORD PTR [esi]
  00372	3b 1a		 cmp	 ebx, DWORD PTR [edx]
  00374	75 38		 jne	 SHORT $LN1@HORSPOOL_h
  00376	83 e9 04	 sub	 ecx, 4
  00379	83 c2 04	 add	 edx, 4
  0037c	83 c6 04	 add	 esi, 4
  0037f	83 f9 04	 cmp	 ecx, 4
  00382	73 ec		 jae	 SHORT $LL14@HORSPOOL_h
$LN22@HORSPOOL_h:
  00384	85 c9		 test	 ecx, ecx
  00386	74 20		 je	 SHORT $LN16@HORSPOOL_h
  00388	8a 1a		 mov	 bl, BYTE PTR [edx]
  0038a	3a 1e		 cmp	 bl, BYTE PTR [esi]
  0038c	75 20		 jne	 SHORT $LN1@HORSPOOL_h
  0038e	83 f9 01	 cmp	 ecx, 1
  00391	76 15		 jbe	 SHORT $LN16@HORSPOOL_h
  00393	8a 5a 01	 mov	 bl, BYTE PTR [edx+1]
  00396	3a 5e 01	 cmp	 bl, BYTE PTR [esi+1]
  00399	75 13		 jne	 SHORT $LN1@HORSPOOL_h
  0039b	83 f9 02	 cmp	 ecx, 2
  0039e	76 08		 jbe	 SHORT $LN16@HORSPOOL_h
  003a0	8a 52 02	 mov	 dl, BYTE PTR [edx+2]
  003a3	3a 56 02	 cmp	 dl, BYTE PTR [esi+2]
  003a6	75 06		 jne	 SHORT $LN1@HORSPOOL_h
$LN16@HORSPOOL_h:
  003a8	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN1@HORSPOOL_h:

; 2170 :        i+=bm_bc[ch];

  003ae	0f b6 4c 24 0f	 movzx	 ecx, BYTE PTR _ch$[esp+1056]
  003b3	03 7c 8c 18	 add	 edi, DWORD PTR _bm_bc$[esp+ecx*4+1056]
  003b7	3b 7c 24 14	 cmp	 edi, DWORD PTR $T9541[esp+1056]
  003bb	7e 88		 jle	 SHORT $LL31@HORSPOOL_h
$LN27@HORSPOOL_h:

; 2171 :     }
; 2172 :     return(-1);
; 2173 :    }

  003bd	8b 8c 24 1c 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1056]
  003c4	5f		 pop	 edi
  003c5	5e		 pop	 esi
  003c6	5b		 pop	 ebx
  003c7	33 cc		 xor	 ecx, esp
  003c9	83 c8 ff	 or	 eax, -1
  003cc	e8 00 00 00 00	 call	 @__security_check_cookie@4
  003d1	8b e5		 mov	 esp, ebp
  003d3	5d		 pop	 ebp
  003d4	c3		 ret	 0
_HORSPOOL_hits ENDP
_TEXT	ENDS
PUBLIC	__$ArrayPad$
PUBLIC	_Boyer_Moore_Horspool_Kaze
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_lastch$ = -1045					; size = 1
$T9562 = -1044						; size = 4
tv285 = -1040						; size = 4
_countSTATIC$ = -1036					; size = 4
_bm_bc$ = -1032						; size = 1024
__$ArrayPad$ = -4					; size = 4
_y$ = 8							; size = 4
_x$ = 12						; size = 4
_n$ = 16						; size = 4
_m$ = 20						; size = 4
_Boyer_Moore_Horspool_Kaze PROC

; 2179 :    {

  003e0	55		 push	 ebp
  003e1	8b ec		 mov	 ebp, esp
  003e3	83 e4 f8	 and	 esp, -8			; fffffff8H
  003e6	81 ec 1c 04 00
	00		 sub	 esp, 1052		; 0000041cH
  003ec	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  003f1	33 c4		 xor	 eax, esp
  003f3	89 84 24 18 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1052], eax

; 2180 :     long i;
; 2181 :     int a, j, bm_bc[ASIZE];
; 2182 :     unsigned char ch;
; 2183 :     unsigned char lastch;
; 2184 :     unsigned char firstch;
; 2185 : 
; 2186 :     unsigned long  count;
; 2187 :     unsigned long  countSTATIC;
; 2188 : 
; 2189 :     /* Preprocessing */
; 2190 :     for (a=0; a < ASIZE; a++) bm_bc[a]=m;

  003fa	8b 45 14	 mov	 eax, DWORD PTR _m$[ebp]
  003fd	53		 push	 ebx
  003fe	8b 5d 0c	 mov	 ebx, DWORD PTR _x$[ebp]
  00401	56		 push	 esi
  00402	57		 push	 edi
  00403	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  00408	8d 7c 24 20	 lea	 edi, DWORD PTR _bm_bc$[esp+1064]
  0040c	f3 ab		 rep stosd

; 2191 :     for (j=0; j < m-1; j++) bm_bc[x[j]]=m-j-1;

  0040e	8d 50 ff	 lea	 edx, DWORD PTR [eax-1]
  00411	33 c9		 xor	 ecx, ecx
  00413	85 d2		 test	 edx, edx
  00415	7e 17		 jle	 SHORT $LN7@Boyer_Moor
  00417	8b f2		 mov	 esi, edx
  00419	8d a4 24 00 00
	00 00		 npad	 7
$LL9@Boyer_Moor:
  00420	0f be 3c 0b	 movsx	 edi, BYTE PTR [ebx+ecx]
  00424	89 74 bc 20	 mov	 DWORD PTR _bm_bc$[esp+edi*4+1064], esi
  00428	41		 inc	 ecx
  00429	4e		 dec	 esi
  0042a	3b ca		 cmp	 ecx, edx
  0042c	7c f2		 jl	 SHORT $LL9@Boyer_Moor
$LN7@Boyer_Moor:

; 2192 :    
; 2193 :     /* Searching */
; 2194 :     lastch=x[m-1];
; 2195 :     firstch=x[0];
; 2196 :     i=0;
; 2197 :         countSTATIC = m-2;   
; 2198 :     while (i <= n-m) {

  0042e	8b 75 10	 mov	 esi, DWORD PTR _n$[ebp]
  00431	8a 4c 03 ff	 mov	 cl, BYTE PTR [ebx+eax-1]
  00435	33 ff		 xor	 edi, edi
  00437	8d 50 fe	 lea	 edx, DWORD PTR [eax-2]
  0043a	2b f0		 sub	 esi, eax
  0043c	88 4c 24 13	 mov	 BYTE PTR _lastch$[esp+1064], cl
  00440	89 54 24 1c	 mov	 DWORD PTR _countSTATIC$[esp+1064], edx
  00444	89 74 24 14	 mov	 DWORD PTR $T9562[esp+1064], esi
  00448	78 70		 js	 SHORT $LN5@Boyer_Moor
  0044a	8b 4d 08	 mov	 ecx, DWORD PTR _y$[ebp]
  0044d	8d 44 01 ff	 lea	 eax, DWORD PTR [ecx+eax-1]
  00451	89 44 24 18	 mov	 DWORD PTR tv285[esp+1064], eax
$LL6@Boyer_Moor:

; 2199 :        ch=y[i+m-1];
; 2200 :        //if (ch ==lastch)
; 2201 :           //if (memcmp(&y[i],x,m-1) == 0) OUTPUT(i);
; 2202 : // Below line gives: 315KB/clock
; 2203 :           //if (ch ==lastch && y[i] == firstch && memcmp(&y[i],x,m-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 2204 : // Below line gives: 328KB/clock
; 2205 : //          if (ch == lastch && y[i] == firstch && memcmp(&y[i+1],&x[0+1],m-1-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 2206 : 
; 2207 :           if (ch == lastch && y[i] == firstch)

  00455	8a 54 24 13	 mov	 dl, BYTE PTR _lastch$[esp+1064]
  00459	38 14 38	 cmp	 BYTE PTR [eax+edi], dl
  0045c	75 50		 jne	 SHORT $LN1@Boyer_Moor
  0045e	8b 4d 08	 mov	 ecx, DWORD PTR _y$[ebp]
  00461	0f be 14 0f	 movsx	 edx, BYTE PTR [edi+ecx]
  00465	0f b6 0b	 movzx	 ecx, BYTE PTR [ebx]
  00468	3b d1		 cmp	 edx, ecx
  0046a	75 42		 jne	 SHORT $LN1@Boyer_Moor

; 2208 :              {
; 2209 :          count = countSTATIC;

  0046c	8b 4c 24 1c	 mov	 ecx, DWORD PTR _countSTATIC$[esp+1064]

; 2210 :          while ( count && *(char *)(x+1+(countSTATIC-count)) == *(char *)(&y[i]+1+(countSTATIC-count)) ) {

  00470	85 c9		 test	 ecx, ecx
  00472	74 17		 je	 SHORT $LN19@Boyer_Moor

; 2208 :              {
; 2209 :          count = countSTATIC;

  00474	8b 55 08	 mov	 edx, DWORD PTR _y$[ebp]
  00477	8d 73 01	 lea	 esi, DWORD PTR [ebx+1]
  0047a	8d 54 17 01	 lea	 edx, DWORD PTR [edi+edx+1]
  0047e	8b ff		 npad	 2
$LL3@Boyer_Moor:

; 2210 :          while ( count && *(char *)(x+1+(countSTATIC-count)) == *(char *)(&y[i]+1+(countSTATIC-count)) ) {

  00480	8a 06		 mov	 al, BYTE PTR [esi]
  00482	3a 02		 cmp	 al, BYTE PTR [edx]
  00484	75 1c		 jne	 SHORT $LN2@Boyer_Moor

; 2211 :                count--;

  00486	42		 inc	 edx
  00487	46		 inc	 esi
  00488	49		 dec	 ecx
  00489	75 f5		 jne	 SHORT $LL3@Boyer_Moor
$LN19@Boyer_Moor:

; 2212 :          }
; 2213 :          if ( count == 0) return(i);

  0048b	8b c7		 mov	 eax, edi

; 2218 :     }
; 2219 :     return(-1);
; 2220 :    }

  0048d	5f		 pop	 edi
  0048e	5e		 pop	 esi
  0048f	5b		 pop	 ebx
  00490	8b 8c 24 18 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1052]
  00497	33 cc		 xor	 ecx, esp
  00499	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0049e	8b e5		 mov	 esp, ebp
  004a0	5d		 pop	 ebp
  004a1	c3		 ret	 0
$LN2@Boyer_Moor:

; 2212 :          }
; 2213 :          if ( count == 0) return(i);

  004a2	85 c9		 test	 ecx, ecx
  004a4	74 e5		 je	 SHORT $LN19@Boyer_Moor
  004a6	8b 74 24 14	 mov	 esi, DWORD PTR $T9562[esp+1064]
  004aa	8b 44 24 18	 mov	 eax, DWORD PTR tv285[esp+1064]
$LN1@Boyer_Moor:

; 2214 : 	     }
; 2215 : 
; 2216 : 
; 2217 :        i+=bm_bc[ch];

  004ae	0f b6 0c 38	 movzx	 ecx, BYTE PTR [eax+edi]
  004b2	03 7c 8c 20	 add	 edi, DWORD PTR _bm_bc$[esp+ecx*4+1064]
  004b6	3b fe		 cmp	 edi, esi
  004b8	7e 9b		 jle	 SHORT $LL6@Boyer_Moor
$LN5@Boyer_Moor:

; 2218 :     }
; 2219 :     return(-1);
; 2220 :    }

  004ba	8b 8c 24 24 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1064]
  004c1	5f		 pop	 edi
  004c2	5e		 pop	 esi
  004c3	5b		 pop	 ebx
  004c4	33 cc		 xor	 ecx, esp
  004c6	83 c8 ff	 or	 eax, -1
  004c9	e8 00 00 00 00	 call	 @__security_check_cookie@4
  004ce	8b e5		 mov	 esp, ebp
  004d0	5d		 pop	 ebp
  004d1	c3		 ret	 0
_Boyer_Moore_Horspool_Kaze ENDP
_TEXT	ENDS
PUBLIC	_Karp_Rabin
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_d$ = -4						; size = 4
_y$ = 8							; size = 4
_x$ = 12						; size = 4
$T9581 = 16						; size = 4
_n$ = 16						; size = 4
tv185 = 20						; size = 4
_hx$ = 20						; size = 4
_m$ = 20						; size = 4
_Karp_Rabin PROC

; 2240 :    long Karp_Rabin(char *y, char *x, long n, int m) {

  004e0	51		 push	 ecx
  004e1	53		 push	 ebx
  004e2	55		 push	 ebp

; 2241 :    int d, hx, hy, i, j;
; 2242 : 
; 2243 :    /* Preprocessing */
; 2244 :    /* computes d = 2^(m-1) with
; 2245 :       the left-shift operator */
; 2246 :    for (d = i = 1; i < m; ++i)

  004e3	8b 6c 24 1c	 mov	 ebp, DWORD PTR _m$[esp+8]
  004e7	b8 01 00 00 00	 mov	 eax, 1
  004ec	56		 push	 esi
  004ed	57		 push	 edi
  004ee	89 44 24 10	 mov	 DWORD PTR _d$[esp+20], eax
  004f2	3b e8		 cmp	 ebp, eax
  004f4	7e 13		 jle	 SHORT $LN7@Karp_Rabin
  004f6	8d 4d ff	 lea	 ecx, DWORD PTR [ebp-1]
  004f9	8d a4 24 00 00
	00 00		 npad	 7
$LL9@Karp_Rabin:

; 2247 :       d = (d<<1);

  00500	03 c0		 add	 eax, eax
  00502	49		 dec	 ecx
  00503	75 fb		 jne	 SHORT $LL9@Karp_Rabin
  00505	89 44 24 10	 mov	 DWORD PTR _d$[esp+20], eax
$LN7@Karp_Rabin:

; 2248 : 
; 2249 :    for (hy = hx = i = 0; i < m; ++i) {

  00509	8b 74 24 18	 mov	 esi, DWORD PTR _y$[esp+16]
  0050d	33 ff		 xor	 edi, edi
  0050f	33 d2		 xor	 edx, edx
  00511	89 7c 24 24	 mov	 DWORD PTR _hx$[esp+16], edi
  00515	85 ed		 test	 ebp, ebp
  00517	7e 24		 jle	 SHORT $LN4@Karp_Rabin
  00519	8b 4c 24 1c	 mov	 ecx, DWORD PTR _x$[esp+16]
  0051d	8b c6		 mov	 eax, esi
  0051f	2b ce		 sub	 ecx, esi
  00521	89 6c 24 24	 mov	 DWORD PTR tv185[esp+16], ebp
$LL6@Karp_Rabin:

; 2250 :       hx = ((hx<<1) + x[i]);

  00525	0f be 1c 01	 movsx	 ebx, BYTE PTR [ecx+eax]
  00529	8d 3c 7b	 lea	 edi, DWORD PTR [ebx+edi*2]

; 2251 :       hy = ((hy<<1) + y[i]);

  0052c	0f be 18	 movsx	 ebx, BYTE PTR [eax]
  0052f	40		 inc	 eax
  00530	ff 4c 24 24	 dec	 DWORD PTR tv185[esp+16]
  00534	8d 14 53	 lea	 edx, DWORD PTR [ebx+edx*2]
  00537	75 ec		 jne	 SHORT $LL6@Karp_Rabin

; 2250 :       hx = ((hx<<1) + x[i]);

  00539	89 7c 24 24	 mov	 DWORD PTR _hx$[esp+16], edi
$LN4@Karp_Rabin:

; 2252 :    }
; 2253 : 
; 2254 :    /* Searching */
; 2255 :    j = 0;
; 2256 :    while (j <= n-m) {

  0053d	8b 4c 24 20	 mov	 ecx, DWORD PTR _n$[esp+16]
  00541	33 c0		 xor	 eax, eax
  00543	2b cd		 sub	 ecx, ebp
  00545	89 4c 24 20	 mov	 DWORD PTR $T9581[esp+16], ecx
  00549	78 74		 js	 SHORT $LN2@Karp_Rabin
  0054b	eb 03 8d 49 00	 npad	 5
$LL3@Karp_Rabin:

; 2257 :       if (hx == hy && memcmp(x, y + j, m) == 0) return(j);

  00550	3b fa		 cmp	 edi, edx
  00552	75 51		 jne	 SHORT $LN1@Karp_Rabin
  00554	8b 7c 24 1c	 mov	 edi, DWORD PTR _x$[esp+16]
  00558	03 f0		 add	 esi, eax
  0055a	8b cd		 mov	 ecx, ebp
  0055c	83 fd 04	 cmp	 ebp, 4
  0055f	72 14		 jb	 SHORT $LN21@Karp_Rabin
$LL13@Karp_Rabin:
  00561	8b 1f		 mov	 ebx, DWORD PTR [edi]
  00563	3b 1e		 cmp	 ebx, DWORD PTR [esi]
  00565	75 32		 jne	 SHORT $LN26@Karp_Rabin
  00567	83 e9 04	 sub	 ecx, 4
  0056a	83 c6 04	 add	 esi, 4
  0056d	83 c7 04	 add	 edi, 4
  00570	83 f9 04	 cmp	 ecx, 4
  00573	73 ec		 jae	 SHORT $LL13@Karp_Rabin
$LN21@Karp_Rabin:
  00575	85 c9		 test	 ecx, ecx
  00577	74 49		 je	 SHORT $LN10@Karp_Rabin
  00579	8a 1e		 mov	 bl, BYTE PTR [esi]
  0057b	3a 1f		 cmp	 bl, BYTE PTR [edi]
  0057d	75 1a		 jne	 SHORT $LN26@Karp_Rabin
  0057f	83 f9 01	 cmp	 ecx, 1
  00582	76 3e		 jbe	 SHORT $LN10@Karp_Rabin
  00584	8a 5e 01	 mov	 bl, BYTE PTR [esi+1]
  00587	3a 5f 01	 cmp	 bl, BYTE PTR [edi+1]
  0058a	75 0d		 jne	 SHORT $LN26@Karp_Rabin
  0058c	83 f9 02	 cmp	 ecx, 2
  0058f	76 31		 jbe	 SHORT $LN10@Karp_Rabin
  00591	8a 4e 02	 mov	 cl, BYTE PTR [esi+2]
  00594	3a 4f 02	 cmp	 cl, BYTE PTR [edi+2]
  00597	74 29		 je	 SHORT $LN10@Karp_Rabin
$LN26@Karp_Rabin:
  00599	8b 74 24 18	 mov	 esi, DWORD PTR _y$[esp+16]
  0059d	8b 7c 24 24	 mov	 edi, DWORD PTR _hx$[esp+16]
  005a1	8b 4c 24 20	 mov	 ecx, DWORD PTR $T9581[esp+16]
$LN1@Karp_Rabin:

; 2258 :       hy = REHASH(y[j], y[j + m], hy);

  005a5	0f be 1c 30	 movsx	 ebx, BYTE PTR [eax+esi]
  005a9	0f af 5c 24 10	 imul	 ebx, DWORD PTR _d$[esp+20]
  005ae	2b d3		 sub	 edx, ebx
  005b0	8d 1c 30	 lea	 ebx, DWORD PTR [eax+esi]
  005b3	0f be 1c 2b	 movsx	 ebx, BYTE PTR [ebx+ebp]

; 2259 :       ++j;

  005b7	40		 inc	 eax
  005b8	8d 14 53	 lea	 edx, DWORD PTR [ebx+edx*2]
  005bb	3b c1		 cmp	 eax, ecx
  005bd	7e 91		 jle	 SHORT $LL3@Karp_Rabin
$LN2@Karp_Rabin:

; 2260 :    }
; 2261 :     return(-1);

  005bf	83 c8 ff	 or	 eax, -1
$LN10@Karp_Rabin:
  005c2	5f		 pop	 edi
  005c3	5e		 pop	 esi
  005c4	5d		 pop	 ebp
  005c5	5b		 pop	 ebx

; 2262 :    }

  005c6	59		 pop	 ecx
  005c7	c3		 ret	 0
_Karp_Rabin ENDP
_TEXT	ENDS
PUBLIC	_KarpRabinKaze
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_pbTargetMax$ = -4					; size = 4
_ulHashPattern$ = 8					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
tv199 = 16						; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_KarpRabinKaze PROC

; 2271 : {

  005d0	51		 push	 ecx

; 2272 :     unsigned int    i;
; 2273 :     char *  pbTargetMax = pbTarget + cbTarget;

  005d1	8b 44 24 10	 mov	 eax, DWORD PTR _cbTarget$[esp]
  005d5	55		 push	 ebp
  005d6	8b 6c 24 0c	 mov	 ebp, DWORD PTR _pbTarget$[esp+4]
  005da	8d 0c 28	 lea	 ecx, DWORD PTR [eax+ebp]
  005dd	57		 push	 edi

; 2274 :     char *  pbPatternMax = pbPattern + cbPattern;

  005de	8b 7c 24 1c	 mov	 edi, DWORD PTR _cbPattern$[esp+8]
  005e2	89 4c 24 08	 mov	 DWORD PTR _pbTargetMax$[esp+12], ecx
  005e6	8b 4c 24 14	 mov	 ecx, DWORD PTR _pbPattern$[esp+8]
  005ea	8d 14 39	 lea	 edx, DWORD PTR [ecx+edi]

; 2275 :     unsigned long  ulBaseToPowerMod = 1;
; 2276 :     register unsigned long  ulHashPattern = 0;
; 2277 :     unsigned long  ulHashTarget = 0;
; 2278 : long hits = 0;
; 2279 : //unsigned long count;
; 2280 :     //char *  buf1;
; 2281 :     //char *  buf2;
; 2282 : 
; 2283 :     if (cbPattern > cbTarget)

  005ed	3b f8		 cmp	 edi, eax
  005ef	76 06		 jbe	 SHORT $LN16@KarpRabinK

; 2284 :         return(NULL);

  005f1	5f		 pop	 edi
  005f2	33 c0		 xor	 eax, eax
  005f4	5d		 pop	 ebp

; 2366 : }

  005f5	59		 pop	 ecx
  005f6	c3		 ret	 0
$LN16@KarpRabinK:

; 2285 : 
; 2286 :     // Compute the power of the left most character in base ulBase
; 2287 :     //for (i = 1; i < cbPattern; i++) ulBaseToPowerMod = (ulBase * ulBaseToPowerMod);
; 2288 : 
; 2289 :     // Calculate the hash function for the src (and the first dst)
; 2290 :     while (pbPattern < pbPatternMax)

  005f7	3b ca		 cmp	 ecx, edx
  005f9	73 06		 jae	 SHORT $LN6@KarpRabinK
  005fb	2b d1		 sub	 edx, ecx
  005fd	03 ca		 add	 ecx, edx
  005ff	03 ea		 add	 ebp, edx
$LN6@KarpRabinK:

; 2291 :     {
; 2292 :         // Below lines give 366KB/clock for 'underdog':
; 2293 :         //ulHashPattern = (ulHashPattern*ulBase + *pbPattern);
; 2294 :         //ulHashTarget = (ulHashTarget*ulBase + *pbTarget);
; 2295 :         pbPattern++;
; 2296 :         pbTarget++;
; 2297 :     }
; 2298 :         // Below lines give 436KB/clock for 'underdog' + requirement pattern to be 4 chars min.:
; 2299 :         //ulHashPattern = ( (*(long *)(pbPattern-cbPattern)) & 0xffffff00 ) + *(pbPattern-1);
; 2300 :         //ulHashTarget = ( (*(long *)(pbTarget-cbPattern)) & 0xffffff00 ) + *(pbTarget-1);
; 2301 :         // Below lines give 482KB/clock for 'underdog' + requirement pattern to be 2 chars min.:
; 2302 :         //ulHashPattern = ( (*(unsigned short *)(pbPattern-cbPattern)) | *(pbPattern-1) );
; 2303 :         //ulHashTarget = ( (*(unsigned short *)(pbTarget-cbPattern)) | *(pbTarget-1) );
; 2304 :         // Below lines give 482KB/clock for 'underdog' + requirement pattern to be 2 chars min.:
; 2305 :         //ulHashPattern = ( (*(unsigned short *)(pbPattern-cbPattern)) & 0xff00 ) + *(pbPattern-1);
; 2306 :         //ulHashTarget = ( (*(unsigned short *)(pbTarget-cbPattern)) & 0xff00 ) + *(pbTarget-1);
; 2307 :         // Below lines give 605KB/clock for 'underdog' + requirement pattern to be 2 chars min.:
; 2308 :         //ulHashPattern = ( (*(unsigned short *)(pbPattern-cbPattern))<<8 ) + *(pbPattern-1);
; 2309 :         //ulHashTarget = ( (*(unsigned short *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1);
; 2310 :         // Below lines give 668KB/clock for 'underdog':
; 2311 :         ulHashPattern = ( (*(char *)(pbPattern-cbPattern))<<8 ) + *(pbPattern-1);

  00601	0f be 51 ff	 movsx	 edx, BYTE PTR [ecx-1]

; 2312 :         ulHashTarget = ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1);

  00605	0f be 45 ff	 movsx	 eax, BYTE PTR [ebp-1]
  00609	53		 push	 ebx
  0060a	56		 push	 esi
  0060b	8b f1		 mov	 esi, ecx
  0060d	2b f7		 sub	 esi, edi
  0060f	0f be 1e	 movsx	 ebx, BYTE PTR [esi]
  00612	c1 e3 08	 shl	 ebx, 8
  00615	03 da		 add	 ebx, edx
  00617	8b d5		 mov	 edx, ebp
  00619	2b d7		 sub	 edx, edi
  0061b	0f be 0a	 movsx	 ecx, BYTE PTR [edx]
  0061e	c1 e1 08	 shl	 ecx, 8
  00621	03 c8		 add	 ecx, eax
  00623	89 74 24 20	 mov	 DWORD PTR tv199[esp+16], esi
  00627	89 5c 24 18	 mov	 DWORD PTR _ulHashPattern$[esp+16], ebx
  0062b	8b c2		 mov	 eax, edx
  0062d	8d 49 00	 npad	 3
$LL4@KarpRabinK:

; 2313 : 
; 2314 :     // Dynamically produce hash values for the string as we go
; 2315 :     for ( ;; )
; 2316 :     {
; 2317 :         if ( (ulHashPattern == ulHashTarget) && !memcmp(pbPattern-cbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )

  00630	3b d9		 cmp	 ebx, ecx
  00632	75 4c		 jne	 SHORT $LN2@KarpRabinK
  00634	8b cf		 mov	 ecx, edi
  00636	8b d0		 mov	 edx, eax
  00638	83 ff 04	 cmp	 edi, 4
  0063b	72 17		 jb	 SHORT $LN19@KarpRabinK
  0063d	8d 49 00	 npad	 3
$LL11@KarpRabinK:
  00640	8b 1e		 mov	 ebx, DWORD PTR [esi]
  00642	3b 1a		 cmp	 ebx, DWORD PTR [edx]
  00644	75 32		 jne	 SHORT $LN23@KarpRabinK
  00646	83 e9 04	 sub	 ecx, 4
  00649	83 c2 04	 add	 edx, 4
  0064c	83 c6 04	 add	 esi, 4
  0064f	83 f9 04	 cmp	 ecx, 4
  00652	73 ec		 jae	 SHORT $LL11@KarpRabinK
$LN19@KarpRabinK:
  00654	85 c9		 test	 ecx, ecx
  00656	74 3f		 je	 SHORT $LN13@KarpRabinK
  00658	8a 1a		 mov	 bl, BYTE PTR [edx]
  0065a	3a 1e		 cmp	 bl, BYTE PTR [esi]
  0065c	75 1a		 jne	 SHORT $LN23@KarpRabinK
  0065e	83 f9 01	 cmp	 ecx, 1
  00661	76 34		 jbe	 SHORT $LN13@KarpRabinK
  00663	8a 5a 01	 mov	 bl, BYTE PTR [edx+1]
  00666	3a 5e 01	 cmp	 bl, BYTE PTR [esi+1]
  00669	75 0d		 jne	 SHORT $LN23@KarpRabinK
  0066b	83 f9 02	 cmp	 ecx, 2
  0066e	76 27		 jbe	 SHORT $LN13@KarpRabinK
  00670	8a 4a 02	 mov	 cl, BYTE PTR [edx+2]
  00673	3a 4e 02	 cmp	 cl, BYTE PTR [esi+2]
  00676	74 1f		 je	 SHORT $LN13@KarpRabinK
$LN23@KarpRabinK:
  00678	8b 5c 24 18	 mov	 ebx, DWORD PTR _ulHashPattern$[esp+16]
  0067c	8b 74 24 20	 mov	 esi, DWORD PTR tv199[esp+16]
$LN2@KarpRabinK:

; 2331 :             //hits++;
; 2332 :                                                              
; 2333 :         if (pbTarget == pbTargetMax)

  00680	3b 6c 24 10	 cmp	 ebp, DWORD PTR _pbTargetMax$[esp+20]
  00684	74 1b		 je	 SHORT $LN20@KarpRabinK

; 2335 : 
; 2336 :         // Below line gives 482KB/clock for 'underdog' + requirement pattern to be 2 chars min.:
; 2337 :         //ulHashTarget = ( (*(unsigned short *)(pbTarget+1-cbPattern)) | *pbTarget );
; 2338 :         // Below line gives 436KB/clock for 'underdog' + requirement pattern to be 4 chars min.:
; 2339 :         //ulHashTarget = ( (*(long *)(pbTarget+1-cbPattern)) & 0xffffff00 ) + *pbTarget;
; 2340 : //; Line 696
; 2341 : //        movsx   esi, BYTE PTR [ebx]
; 2342 : //        mov     ecx, DWORD PTR [edx+1]
; 2343 : //        and     ecx, -256                               ; ffffff00H
; 2344 : //        add     ecx, esi
; 2345 :         // Below line gives 482KB/clock for 'underdog' + requirement pattern to be 2 chars min.:
; 2346 :         //ulHashTarget = ( (*(unsigned short *)(pbTarget+1-cbPattern)) & 0xff00 ) + *pbTarget;
; 2347 : //; Line 691
; 2348 : //        movsx   esi, BYTE PTR [ebx]
; 2349 : //        xor     ecx, ecx
; 2350 : //        mov     cx, WORD PTR [edx+1]
; 2351 : //        and     ecx, 65280                              ; 0000ff00H
; 2352 : //        add     ecx, esi
; 2353 :         // Below line gives 605KB/clock for 'underdog' + requirement pattern to be 2 chars min.:
; 2354 :         //ulHashTarget = ( (*(unsigned short *)(pbTarget+1-cbPattern))<<8 ) + *pbTarget;
; 2355 :         // Below line gives 668KB/clock for 'underdog':
; 2356 :         ulHashTarget = ( (*(char *)(pbTarget+1-cbPattern))<<8 ) + *pbTarget;

  00686	0f be 48 01	 movsx	 ecx, BYTE PTR [eax+1]
  0068a	0f be 55 00	 movsx	 edx, BYTE PTR [ebp]
  0068e	c1 e1 08	 shl	 ecx, 8
  00691	03 ca		 add	 ecx, edx

; 2357 : //; Line 718
; 2358 : //        movsx   ecx, BYTE PTR [eax+1]
; 2359 : //        movsx   edx, BYTE PTR [ebp]
; 2360 : //        shl     ecx, 8
; 2361 : //        add     ecx, edx
; 2362 :         // Below line gives 366KB/clock for 'underdog':
; 2363 :         //ulHashTarget = (ulHashTarget - *(pbTarget-cbPattern)*ulBaseToPowerMod)*ulBase + *pbTarget;
; 2364 :         pbTarget++;

  00693	45		 inc	 ebp
  00694	40		 inc	 eax

; 2365 :     }

  00695	eb 99		 jmp	 SHORT $LL4@KarpRabinK
$LN13@KarpRabinK:
  00697	5e		 pop	 esi

; 2318 :        // if ( ulHashPattern == ulHashTarget ) {
; 2319 :        // 
; 2320 :        //  count = cbPattern;
; 2321 :        //  buf1 = pbPattern-cbPattern;
; 2322 :        //  buf2 = pbTarget-cbPattern;
; 2323 :        //  while ( --count && *(char *)buf1 == *(char *)buf2 ) {
; 2324 :        //          buf1 = (char *)buf1 + 1;
; 2325 :        //          buf2 = (char *)buf2 + 1;
; 2326 :        //  }
; 2327 :        //                 
; 2328 :        //  if ( *((unsigned char *)buf1) - *((unsigned char *)buf2) == 0) hits++;
; 2329 :        //  }
; 2330 :             return((pbTarget-cbPattern));

  00698	8b c5		 mov	 eax, ebp
  0069a	5b		 pop	 ebx
  0069b	2b c7		 sub	 eax, edi
  0069d	5f		 pop	 edi
  0069e	5d		 pop	 ebp

; 2366 : }

  0069f	59		 pop	 ecx
  006a0	c3		 ret	 0
$LN20@KarpRabinK:
  006a1	5e		 pop	 esi
  006a2	5b		 pop	 ebx
  006a3	5f		 pop	 edi

; 2334 :             return(NULL);

  006a4	33 c0		 xor	 eax, eax
  006a6	5d		 pop	 ebp

; 2366 : }

  006a7	59		 pop	 ecx
  006a8	c3		 ret	 0
_KarpRabinKaze ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_pbPattern$GSCopy$ = -1060				; size = 4
$T9625 = -1056						; size = 4
_Quadruplet3rd$ = -1056					; size = 4
_countSTATIC$ = -1052					; size = 4
_Quadruplet4th$ = -1052					; size = 4
_AdvanceHopperGrass$ = -1048				; size = 4
tv594 = -1044						; size = 4
_Quadruplet2nd$ = -1044					; size = 4
tv392 = -1040						; size = 4
_pbTargetMax$ = -1040					; size = 4
tv565 = -1036						; size = 4
_ulHashPattern$ = -1032					; size = 4
_bm_bc$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet PROC

; 2376 : {

  006b0	81 ec 24 04 00
	00		 sub	 esp, 1060		; 00000424H
  006b6	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  006bb	33 c4		 xor	 eax, esp
  006bd	89 84 24 20 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1060], eax
  006c4	8b 94 24 2c 04
	00 00		 mov	 edx, DWORD PTR _pbPattern$[esp+1056]
  006cb	53		 push	 ebx

; 2377 :     char * pbTargetMax = pbTarget + cbTarget;

  006cc	8b 9c 24 34 04
	00 00		 mov	 ebx, DWORD PTR _cbTarget$[esp+1060]
  006d3	55		 push	 ebp

; 2378 :     register unsigned long  ulHashPattern;
; 2379 :     unsigned long ulHashTarget;
; 2380 :     unsigned long count;
; 2381 :     unsigned long countSTATIC;
; 2382 : //  unsigned long countRemainder;
; 2383 : 
; 2384 : /*
; 2385 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 2386 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 2387 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 2388 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 2389 : */
; 2390 :     unsigned char SINGLET;
; 2391 :     unsigned long Quadruplet2nd;
; 2392 :     unsigned long Quadruplet3rd;
; 2393 :     unsigned long Quadruplet4th;
; 2394 : 
; 2395 :     unsigned long  AdvanceHopperGrass;
; 2396 : 
; 2397 :     long i; //BMH needed
; 2398 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 2399 :     unsigned char ch; //BMH needed
; 2400 : //    unsigned char lastch, firstch; //BMH needed
; 2401 : 
; 2402 :     if (cbPattern > cbTarget)

  006d4	8b ac 24 3c 04
	00 00		 mov	 ebp, DWORD PTR _cbPattern$[esp+1064]
  006db	56		 push	 esi
  006dc	8b b4 24 34 04
	00 00		 mov	 esi, DWORD PTR _pbTarget$[esp+1068]
  006e3	57		 push	 edi
  006e4	8d 3c 1e	 lea	 edi, DWORD PTR [esi+ebx]
  006e7	89 54 24 10	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1076], edx
  006eb	89 7c 24 24	 mov	 DWORD PTR _pbTargetMax$[esp+1076], edi
  006ef	3b eb		 cmp	 ebp, ebx

; 2403 :         return(NULL);

  006f1	77 46		 ja	 SHORT $LN5@Railgun_Qu

; 2404 : 
; 2405 : // Doesn't work when cbPattern = 1
; 2406 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 2407 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  006f3	83 fd 04	 cmp	 ebp, 4
  006f6	0f 83 97 00 00
	00		 jae	 $LN41@Railgun_Qu

; 2408 :         pbTarget = pbTarget+cbPattern;
; 2409 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  006fc	0f be 02	 movsx	 eax, BYTE PTR [edx]
  006ff	0f be 4c 2a ff	 movsx	 ecx, BYTE PTR [edx+ebp-1]
  00704	c1 e0 08	 shl	 eax, 8
  00707	03 f5		 add	 esi, ebp
  00709	03 c8		 add	 ecx, eax

; 2410 : //        countSTATIC = cbPattern-2;
; 2411 : 
; 2412 : if ( cbPattern==3) {

  0070b	83 fd 03	 cmp	 ebp, 3
  0070e	75 49		 jne	 SHORT $LN46@Railgun_Qu
$LL39@Railgun_Qu:

; 2413 :     for ( ;; )
; 2414 :     {
; 2415 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  00710	0f be 46 fd	 movsx	 eax, BYTE PTR [esi-3]
  00714	0f be 5e ff	 movsx	 ebx, BYTE PTR [esi-1]
  00718	c1 e0 08	 shl	 eax, 8
  0071b	03 c3		 add	 eax, ebx
  0071d	3b c8		 cmp	 ecx, eax
  0071f	75 08		 jne	 SHORT $LN36@Railgun_Qu

; 2416 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  00721	8a 42 01	 mov	 al, BYTE PTR [edx+1]
  00724	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  00727	74 2b		 je	 SHORT $LN53@Railgun_Qu
$LN36@Railgun_Qu:

; 2417 :         }
; 2418 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  00729	8b c1		 mov	 eax, ecx
  0072b	c1 e8 08	 shr	 eax, 8
  0072e	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  00731	74 01		 je	 SHORT $LN35@Railgun_Qu
  00733	46		 inc	 esi
$LN35@Railgun_Qu:

; 2419 :         pbTarget++;

  00734	46		 inc	 esi

; 2420 :         if (pbTarget > pbTargetMax)

  00735	3b f7		 cmp	 esi, edi
  00737	76 d7		 jbe	 SHORT $LL39@Railgun_Qu
$LN5@Railgun_Qu:

; 2555 :     }
; 2556 :     return(NULL);

  00739	33 c0		 xor	 eax, eax
$LN13@Railgun_Qu:

; 2557 : } //if (cbTarget<961)
; 2558 : } //if ( cbPattern<4)
; 2559 : }

  0073b	8b 8c 24 30 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1076]
  00742	5f		 pop	 edi
  00743	5e		 pop	 esi
  00744	5d		 pop	 ebp
  00745	5b		 pop	 ebx
  00746	33 cc		 xor	 ecx, esp
  00748	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0074d	81 c4 24 04 00
	00		 add	 esp, 1060		; 00000424H
  00753	c3		 ret	 0
$LN53@Railgun_Qu:

; 2416 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  00754	8d 46 fd	 lea	 eax, DWORD PTR [esi-3]

; 2421 :             return(NULL);

  00757	eb e2		 jmp	 SHORT $LN13@Railgun_Qu
$LN46@Railgun_Qu:

; 2422 :     }
; 2423 : } else {
; 2424 : }
; 2425 :     for ( ;; )
; 2426 :     {
; 2427 :         // The line below gives for 'cbPattern'>=1:
; 2428 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 2429 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 2430 : /*
; 2431 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 2432 :             return((long)(pbTarget-cbPattern));
; 2433 : */
; 2434 : 
; 2435 :         // The fragment below gives for 'cbPattern'>=2:
; 2436 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 2437 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 2438 : 
; 2439 : /*
; 2440 : //For 2 and 3 [
; 2441 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 2442 : //         count = countSTATIC;
; 2443 :          count = cbPattern-2;
; 2444 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 2445 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 2446 :                count--;
; 2447 :          }
; 2448 :          if ( count == 0) return((pbTarget-cbPattern));
; 2449 :         }
; 2450 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 2451 : //For 2 and 3 ]
; 2452 : */
; 2453 : 
; 2454 : 
; 2455 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  00759	8a 46 ff	 mov	 al, BYTE PTR [esi-1]
  0075c	0f be 56 fe	 movsx	 edx, BYTE PTR [esi-2]
  00760	0f be d8	 movsx	 ebx, al
  00763	c1 e2 08	 shl	 edx, 8
  00766	03 d3		 add	 edx, ebx
  00768	3b ca		 cmp	 ecx, edx
  0076a	74 22		 je	 SHORT $LN55@Railgun_Qu
  0076c	8b d1		 mov	 edx, ecx
  0076e	c1 ea 08	 shr	 edx, 8
$LL32@Railgun_Qu:

; 2457 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  00771	3a d0		 cmp	 dl, al
  00773	74 01		 je	 SHORT $LN73@Railgun_Qu
  00775	46		 inc	 esi
$LN73@Railgun_Qu:

; 2458 : 
; 2459 : 
; 2460 :         // The fragment below gives for 'cbPattern'>=2:
; 2461 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 2462 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 2463 : /*
; 2464 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 2465 :          count = countSTATIC>>2;
; 2466 :          countRemainder = countSTATIC % 4;
; 2467 : 
; 2468 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 2469 :                count--;
; 2470 :          }
; 2471 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 2472 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 2473 :                countRemainder--;
; 2474 :          }
; 2475 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 2476 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 2477 :          //}
; 2478 :         }
; 2479 : */
; 2480 : 
; 2481 :         pbTarget++;

  00776	46		 inc	 esi

; 2482 :         if (pbTarget > pbTargetMax)

  00777	3b f7		 cmp	 esi, edi
  00779	77 be		 ja	 SHORT $LN5@Railgun_Qu

; 2422 :     }
; 2423 : } else {
; 2424 : }
; 2425 :     for ( ;; )
; 2426 :     {
; 2427 :         // The line below gives for 'cbPattern'>=1:
; 2428 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 2429 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 2430 : /*
; 2431 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 2432 :             return((long)(pbTarget-cbPattern));
; 2433 : */
; 2434 : 
; 2435 :         // The fragment below gives for 'cbPattern'>=2:
; 2436 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 2437 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 2438 : 
; 2439 : /*
; 2440 : //For 2 and 3 [
; 2441 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 2442 : //         count = countSTATIC;
; 2443 :          count = cbPattern-2;
; 2444 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 2445 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 2446 :                count--;
; 2447 :          }
; 2448 :          if ( count == 0) return((pbTarget-cbPattern));
; 2449 :         }
; 2450 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 2451 : //For 2 and 3 ]
; 2452 : */
; 2453 : 
; 2454 : 
; 2455 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  0077b	8a 46 ff	 mov	 al, BYTE PTR [esi-1]
  0077e	0f be 5e fe	 movsx	 ebx, BYTE PTR [esi-2]
  00782	0f be e8	 movsx	 ebp, al
  00785	c1 e3 08	 shl	 ebx, 8
  00788	03 dd		 add	 ebx, ebp
  0078a	3b cb		 cmp	 ecx, ebx
  0078c	75 e3		 jne	 SHORT $LL32@Railgun_Qu
$LN55@Railgun_Qu:

; 2456 :             return((pbTarget-2));

  0078e	8d 46 fe	 lea	 eax, DWORD PTR [esi-2]

; 2483 :             return(NULL);

  00791	eb a8		 jmp	 SHORT $LN13@Railgun_Qu
$LN41@Railgun_Qu:

; 2484 :     }
; 2485 : } else { //if ( cbPattern<4)
; 2486 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  00793	81 fb c1 03 00
	00		 cmp	 ebx, 961		; 000003c1H
  00799	0f 83 dc 00 00
	00		 jae	 $LN26@Railgun_Qu

; 2487 : {
; 2488 :         pbTarget = pbTarget+cbPattern;
; 2489 :         ulHashPattern = *(unsigned long *)(pbPattern);

  0079f	8b 0a		 mov	 ecx, DWORD PTR [edx]

; 2490 : //        countSTATIC = cbPattern-1;
; 2491 : 
; 2492 :     //SINGLET = *(char *)(pbPattern);
; 2493 :     SINGLET = ulHashPattern & 0xFF;
; 2494 :     Quadruplet2nd = SINGLET<<8;

  007a1	0f b6 c1	 movzx	 eax, cl
  007a4	8b f8		 mov	 edi, eax

; 2495 :     Quadruplet3rd = SINGLET<<16;

  007a6	8b d0		 mov	 edx, eax
  007a8	c1 e7 08	 shl	 edi, 8
  007ab	c1 e2 10	 shl	 edx, 16			; 00000010H
  007ae	03 f5		 add	 esi, ebp
  007b0	89 44 24 28	 mov	 DWORD PTR tv565[esp+1076], eax

; 2496 :     Quadruplet4th = SINGLET<<24;

  007b4	c1 e0 18	 shl	 eax, 24			; 00000018H
  007b7	89 4c 24 2c	 mov	 DWORD PTR _ulHashPattern$[esp+1076], ecx
  007bb	89 7c 24 20	 mov	 DWORD PTR _Quadruplet2nd$[esp+1076], edi
  007bf	89 54 24 14	 mov	 DWORD PTR _Quadruplet3rd$[esp+1076], edx
  007c3	89 44 24 18	 mov	 DWORD PTR _Quadruplet4th$[esp+1076], eax
$LL25@Railgun_Qu:

; 2497 : 
; 2498 :     for ( ;; )
; 2499 :     {
; 2500 : 	AdvanceHopperGrass = 0;
; 2501 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  007c7	8b c6		 mov	 eax, esi
  007c9	2b c5		 sub	 eax, ebp
  007cb	8b 00		 mov	 eax, DWORD PTR [eax]
  007cd	33 d2		 xor	 edx, edx
  007cf	89 54 24 1c	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1076], edx

; 2502 : 
; 2503 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  007d3	3b c8		 cmp	 ecx, eax
  007d5	75 59		 jne	 SHORT $LN23@Railgun_Qu

; 2504 : //         count = countSTATIC;
; 2505 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 2506 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 2507 : //               count--;
; 2508 : //         }
; 2509 :          count = cbPattern-1;

  007d7	8d 45 ff	 lea	 eax, DWORD PTR [ebp-1]

; 2510 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  007da	85 c0		 test	 eax, eax
  007dc	74 3f		 je	 SHORT $LN65@Railgun_Qu

; 2504 : //         count = countSTATIC;
; 2505 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 2506 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 2507 : //               count--;
; 2508 : //         }
; 2509 :          count = cbPattern-1;

  007de	8b 4c 24 10	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  007e2	8b fe		 mov	 edi, esi
  007e4	2b c8		 sub	 ecx, eax
  007e6	2b f8		 sub	 edi, eax
  007e8	03 cd		 add	 ecx, ebp
  007ea	8d 9b 00 00 00
	00		 npad	 6
$LL22@Railgun_Qu:

; 2510 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  007f0	8a 1f		 mov	 bl, BYTE PTR [edi]
  007f2	38 19		 cmp	 BYTE PTR [ecx], bl
  007f4	75 30		 jne	 SHORT $LN21@Railgun_Qu

; 2511 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  007f6	8d 1c 10	 lea	 ebx, DWORD PTR [eax+edx]
  007f9	8d 55 ff	 lea	 edx, DWORD PTR [ebp-1]
  007fc	3b d3		 cmp	 edx, ebx
  007fe	75 14		 jne	 SHORT $LN68@Railgun_Qu
  00800	0f be 17	 movsx	 edx, BYTE PTR [edi]
  00803	39 54 24 28	 cmp	 DWORD PTR tv565[esp+1076], edx
  00807	74 0b		 je	 SHORT $LN68@Railgun_Qu
  00809	8b 54 24 1c	 mov	 edx, DWORD PTR _AdvanceHopperGrass$[esp+1076]
  0080d	42		 inc	 edx
  0080e	89 54 24 1c	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1076], edx
  00812	eb 04		 jmp	 SHORT $LN20@Railgun_Qu
$LN68@Railgun_Qu:
  00814	8b 54 24 1c	 mov	 edx, DWORD PTR _AdvanceHopperGrass$[esp+1076]
$LN20@Railgun_Qu:

; 2512 :                count--;

  00818	41		 inc	 ecx
  00819	47		 inc	 edi
  0081a	48		 dec	 eax
  0081b	75 d3		 jne	 SHORT $LL22@Railgun_Qu
$LN65@Railgun_Qu:

; 2513 :          }
; 2514 :          if ( count == 0) return((pbTarget-cbPattern));

  0081d	8b c6		 mov	 eax, esi
  0081f	2b c5		 sub	 eax, ebp

; 2529 :             return(NULL);

  00821	e9 15 ff ff ff	 jmp	 $LN13@Railgun_Qu
$LN21@Railgun_Qu:

; 2513 :          }
; 2514 :          if ( count == 0) return((pbTarget-cbPattern));

  00826	85 c0		 test	 eax, eax
  00828	74 f3		 je	 SHORT $LN65@Railgun_Qu

; 2515 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  0082a	8b 4c 24 2c	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+1076]
  0082e	eb 34		 jmp	 SHORT $LN70@Railgun_Qu
$LN23@Railgun_Qu:

; 2516 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  00830	8b d8		 mov	 ebx, eax
  00832	81 e3 00 ff 00
	00		 and	 ebx, 65280		; 0000ff00H
  00838	3b fb		 cmp	 edi, ebx
  0083a	74 28		 je	 SHORT $LN70@Railgun_Qu

; 2517 :          AdvanceHopperGrass++;
; 2518 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  0083c	8b f8		 mov	 edi, eax
  0083e	81 e7 00 00 ff
	00		 and	 edi, 16711680		; 00ff0000H
  00844	ba 01 00 00 00	 mov	 edx, 1
  00849	39 7c 24 14	 cmp	 DWORD PTR _Quadruplet3rd$[esp+1076], edi
  0084d	74 15		 je	 SHORT $LN70@Railgun_Qu

; 2519 :               AdvanceHopperGrass++;
; 2520 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  0084f	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  00854	ba 02 00 00 00	 mov	 edx, 2
  00859	39 44 24 18	 cmp	 DWORD PTR _Quadruplet4th$[esp+1076], eax
  0085d	74 05		 je	 SHORT $LN70@Railgun_Qu
  0085f	ba 03 00 00 00	 mov	 edx, 3
$LN70@Railgun_Qu:

; 2521 :          }
; 2522 :     }
; 2523 : 	}
; 2524 : 
; 2525 : 	AdvanceHopperGrass++;
; 2526 : 
; 2527 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  00864	8d 74 16 01	 lea	 esi, DWORD PTR [esi+edx+1]

; 2528 :         if (pbTarget > pbTargetMax)

  00868	3b 74 24 24	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+1076]
  0086c	0f 87 c7 fe ff
	ff		 ja	 $LN5@Railgun_Qu

; 2530 :     }

  00872	8b 7c 24 20	 mov	 edi, DWORD PTR _Quadruplet2nd$[esp+1076]
  00876	e9 4c ff ff ff	 jmp	 $LL25@Railgun_Qu
$LN26@Railgun_Qu:

; 2531 : } else { //if (cbTarget<961)
; 2532 :         countSTATIC = cbPattern-2;

  0087b	8d 45 fe	 lea	 eax, DWORD PTR [ebp-2]
  0087e	89 44 24 18	 mov	 DWORD PTR _countSTATIC$[esp+1076], eax

; 2533 :     /* Preprocessing */
; 2534 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  00882	8b c5		 mov	 eax, ebp
  00884	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  00889	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc$[esp+1076]
  0088d	f3 ab		 rep stosd

; 2535 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  0088f	8d 7d ff	 lea	 edi, DWORD PTR [ebp-1]
  00892	33 c0		 xor	 eax, eax
  00894	85 ff		 test	 edi, edi
  00896	74 1a		 je	 SHORT $LN7@Railgun_Qu
  00898	8d 4d ff	 lea	 ecx, DWORD PTR [ebp-1]
  0089b	eb 07		 jmp	 SHORT $LN9@Railgun_Qu
  0089d	8d 49 00	 npad	 3
$LL69@Railgun_Qu:
  008a0	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+1076]
$LN9@Railgun_Qu:
  008a4	0f be 14 02	 movsx	 edx, BYTE PTR [edx+eax]
  008a8	89 4c 94 30	 mov	 DWORD PTR _bm_bc$[esp+edx*4+1076], ecx
  008ac	40		 inc	 eax
  008ad	49		 dec	 ecx
  008ae	3b c7		 cmp	 eax, edi
  008b0	72 ee		 jb	 SHORT $LL69@Railgun_Qu
$LN7@Railgun_Qu:

; 2536 : 
; 2537 :     /* Searching */
; 2538 :     //lastch=pbPattern[cbPattern-1];
; 2539 :     //firstch=pbPattern[0];
; 2540 :     i=0;
; 2541 :     while (i <= cbTarget-cbPattern) {

  008b2	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  008b6	0f be 4c 2f ff	 movsx	 ecx, BYTE PTR [edi+ebp-1]
  008bb	33 d2		 xor	 edx, edx
  008bd	2b dd		 sub	 ebx, ebp
  008bf	8d 44 2e ff	 lea	 eax, DWORD PTR [esi+ebp-1]
  008c3	89 5c 24 14	 mov	 DWORD PTR $T9625[esp+1076], ebx
  008c7	89 44 24 20	 mov	 DWORD PTR tv594[esp+1076], eax
  008cb	89 4c 24 24	 mov	 DWORD PTR tv392[esp+1076], ecx
  008cf	90		 npad	 1
$LL6@Railgun_Qu:

; 2542 :        ch=pbTarget[i+cbPattern-1];
; 2543 :        //if (ch ==lastch)
; 2544 :           //if (memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) OUTPUT(i);
; 2545 :           //if (ch == lastch && pbTarget[i] == firstch && memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 2546 :           if (ch == pbPattern[cbPattern-1] && pbTarget[i] == pbPattern[0])

  008d0	8b 44 24 20	 mov	 eax, DWORD PTR tv594[esp+1076]
  008d4	0f b6 2c 10	 movzx	 ebp, BYTE PTR [eax+edx]
  008d8	3b 6c 24 24	 cmp	 ebp, DWORD PTR tv392[esp+1076]
  008dc	75 2f		 jne	 SHORT $LN1@Railgun_Qu
  008de	8a 0c 32	 mov	 cl, BYTE PTR [edx+esi]
  008e1	3a 0f		 cmp	 cl, BYTE PTR [edi]
  008e3	75 28		 jne	 SHORT $LN1@Railgun_Qu

; 2547 :              {
; 2548 :          count = countSTATIC;

  008e5	8b 44 24 18	 mov	 eax, DWORD PTR _countSTATIC$[esp+1076]

; 2549 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) {

  008e9	85 c0		 test	 eax, eax
  008eb	74 10		 je	 SHORT $LN59@Railgun_Qu

; 2547 :              {
; 2548 :          count = countSTATIC;

  008ed	47		 inc	 edi
  008ee	8d 4c 32 01	 lea	 ecx, DWORD PTR [edx+esi+1]
$LL3@Railgun_Qu:

; 2549 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) {

  008f2	8a 1f		 mov	 bl, BYTE PTR [edi]
  008f4	3a 19		 cmp	 bl, BYTE PTR [ecx]
  008f6	75 0d		 jne	 SHORT $LN2@Railgun_Qu

; 2550 :                count--;

  008f8	41		 inc	 ecx
  008f9	47		 inc	 edi
  008fa	48		 dec	 eax
  008fb	75 f5		 jne	 SHORT $LL3@Railgun_Qu
$LN59@Railgun_Qu:

; 2551 :          }
; 2552 :          if ( count == 0) return(pbTarget+i);

  008fd	8d 04 32	 lea	 eax, DWORD PTR [edx+esi]
  00900	e9 36 fe ff ff	 jmp	 $LN13@Railgun_Qu
$LN2@Railgun_Qu:
  00905	85 c0		 test	 eax, eax
  00907	74 f4		 je	 SHORT $LN59@Railgun_Qu
  00909	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+1076]
$LN1@Railgun_Qu:

; 2553 : 	     }
; 2554 :        i+=bm_bc[ch];

  0090d	03 54 ac 30	 add	 edx, DWORD PTR _bm_bc$[esp+ebp*4+1076]
  00911	3b 54 24 14	 cmp	 edx, DWORD PTR $T9625[esp+1076]
  00915	76 b9		 jbe	 SHORT $LL6@Railgun_Qu

; 2536 : 
; 2537 :     /* Searching */
; 2538 :     //lastch=pbPattern[cbPattern-1];
; 2539 :     //firstch=pbPattern[0];
; 2540 :     i=0;
; 2541 :     while (i <= cbTarget-cbPattern) {

  00917	e9 1d fe ff ff	 jmp	 $LN5@Railgun_Qu
_Railgun_Quadruplet ENDP
_TEXT	ENDS
PUBLIC	_Railgun_old_FiLa
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_pbTargetMax$ = -4					; size = 4
tv365 = 8						; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
tv368 = 16						; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_old_FiLa PROC

; 2569 : {

  00920	51		 push	 ecx

; 2570 :     char *  pbTargetMax = pbTarget + cbTarget;

  00921	8b 44 24 10	 mov	 eax, DWORD PTR _cbTarget$[esp]
  00925	55		 push	 ebp

; 2571 :     register unsigned long  ulHashPattern;
; 2572 :     unsigned long  ulHashTarget;
; 2573 :     unsigned long  count;
; 2574 :     unsigned long  countSTATIC, countRemainder;
; 2575 : 
; 2576 :     long i; //BMH needed
; 2577 : //    int a, j, bm_bc[ASIZE]; //BMH needed
; 2578 :     unsigned char ch; //BMH needed
; 2579 : //    unsigned char lastch, firstch; //BMH needed
; 2580 : 
; 2581 :     if (cbPattern > cbTarget)

  00926	8b 6c 24 18	 mov	 ebp, DWORD PTR _cbPattern$[esp+4]
  0092a	57		 push	 edi
  0092b	8b 7c 24 10	 mov	 edi, DWORD PTR _pbTarget$[esp+8]
  0092f	8d 0c 07	 lea	 ecx, DWORD PTR [edi+eax]
  00932	89 4c 24 08	 mov	 DWORD PTR _pbTargetMax$[esp+12], ecx
  00936	3b e8		 cmp	 ebp, eax
  00938	76 06		 jbe	 SHORT $LN8@Railgun_ol

; 2582 :         return(NULL);

  0093a	5f		 pop	 edi
  0093b	33 c0		 xor	 eax, eax
  0093d	5d		 pop	 ebp

; 2637 : }

  0093e	59		 pop	 ecx
  0093f	c3		 ret	 0
$LN8@Railgun_ol:
  00940	56		 push	 esi

; 2583 : 
; 2584 :         countSTATIC = cbPattern-2;
; 2585 : 
; 2586 : // Doesn't work when cbPattern = 1
; 2587 :         pbTarget = pbTarget+cbPattern;
; 2588 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  00941	8b 74 24 18	 mov	 esi, DWORD PTR _pbPattern$[esp+12]
  00945	0f be 16	 movsx	 edx, BYTE PTR [esi]
  00948	0f be 44 2e ff	 movsx	 eax, BYTE PTR [esi+ebp-1]

; 2636 :     }

  0094d	b9 02 00 00 00	 mov	 ecx, 2
  00952	2b cd		 sub	 ecx, ebp
  00954	c1 e2 08	 shl	 edx, 8
  00957	89 4c 24 14	 mov	 DWORD PTR tv365[esp+12], ecx
  0095b	b9 01 00 00 00	 mov	 ecx, 1
  00960	03 fd		 add	 edi, ebp
  00962	03 c2		 add	 eax, edx
  00964	2b cd		 sub	 ecx, ebp
  00966	89 4c 24 1c	 mov	 DWORD PTR tv368[esp+12], ecx
  0096a	53		 push	 ebx
  0096b	eb 03 8d 49 00	 npad	 5
$LL7@Railgun_ol:

; 2589 : 
; 2590 :     for ( ;; )
; 2591 :     {
; 2592 :         // The line below gives for 'cbPattern'>=1:
; 2593 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 2594 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 2595 : /*
; 2596 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 2597 :             return((long)(pbTarget-cbPattern));
; 2598 : */
; 2599 : 
; 2600 :         // The fragment below gives for 'cbPattern'>=2:
; 2601 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 2602 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 2603 : 
; 2604 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {

  00970	0f be 54 39 ff	 movsx	 edx, BYTE PTR [ecx+edi-1]
  00975	0f be 5f ff	 movsx	 ebx, BYTE PTR [edi-1]
  00979	c1 e2 08	 shl	 edx, 8
  0097c	03 d3		 add	 edx, ebx
  0097e	3b c2		 cmp	 eax, edx
  00980	75 31		 jne	 SHORT $LN18@Railgun_ol

; 2605 :          count = countSTATIC;

  00982	8d 4d fe	 lea	 ecx, DWORD PTR [ebp-2]

; 2606 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {

  00985	85 c9		 test	 ecx, ecx
  00987	74 14		 je	 SHORT $LN17@Railgun_ol

; 2605 :          count = countSTATIC;

  00989	8b 54 24 18	 mov	 edx, DWORD PTR tv365[esp+16]
  0098d	46		 inc	 esi
  0098e	8d 54 3a ff	 lea	 edx, DWORD PTR [edx+edi-1]
$LL4@Railgun_ol:

; 2606 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {

  00992	8a 1e		 mov	 bl, BYTE PTR [esi]
  00994	3a 1a		 cmp	 bl, BYTE PTR [edx]
  00996	75 0f		 jne	 SHORT $LN3@Railgun_ol

; 2607 :                count--;

  00998	42		 inc	 edx
  00999	46		 inc	 esi
  0099a	49		 dec	 ecx
  0099b	75 f5		 jne	 SHORT $LL4@Railgun_ol
$LN17@Railgun_ol:
  0099d	5b		 pop	 ebx
  0099e	5e		 pop	 esi

; 2608 :          }
; 2609 :          if ( count == 0) return((pbTarget-cbPattern));

  0099f	8b c7		 mov	 eax, edi
  009a1	5f		 pop	 edi
  009a2	2b c5		 sub	 eax, ebp
  009a4	5d		 pop	 ebp

; 2637 : }

  009a5	59		 pop	 ecx
  009a6	c3		 ret	 0
$LN3@Railgun_ol:

; 2608 :          }
; 2609 :          if ( count == 0) return((pbTarget-cbPattern));

  009a7	85 c9		 test	 ecx, ecx
  009a9	74 f2		 je	 SHORT $LN17@Railgun_ol
  009ab	8b 74 24 1c	 mov	 esi, DWORD PTR _pbPattern$[esp+16]
  009af	8b 4c 24 20	 mov	 ecx, DWORD PTR tv368[esp+16]
$LN18@Railgun_ol:

; 2610 :         }
; 2611 : 
; 2612 :         // The fragment below gives for 'cbPattern'>=2:
; 2613 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 2614 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 2615 : /*
; 2616 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 2617 :          count = countSTATIC>>2;
; 2618 :          countRemainder = countSTATIC % 4;
; 2619 : 
; 2620 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 2621 :                count--;
; 2622 :          }
; 2623 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 2624 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 2625 :                countRemainder--;
; 2626 :          }
; 2627 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 2628 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 2629 :          //}
; 2630 :         }
; 2631 : */
; 2632 : 
; 2633 :         pbTarget++;

  009b3	47		 inc	 edi

; 2634 :         if (pbTarget > pbTargetMax)

  009b4	3b 7c 24 10	 cmp	 edi, DWORD PTR _pbTargetMax$[esp+20]
  009b8	76 b6		 jbe	 SHORT $LL7@Railgun_ol

; 2635 :             return(NULL);

  009ba	5b		 pop	 ebx
  009bb	5e		 pop	 esi
  009bc	5f		 pop	 edi
  009bd	33 c0		 xor	 eax, eax
  009bf	5d		 pop	 ebp

; 2637 : }

  009c0	59		 pop	 ecx
  009c1	c3		 ret	 0
_Railgun_old_FiLa ENDP
_TEXT	ENDS
PUBLIC	_Railgun_Doublet
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_ulHashPattern$ = 8					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_pbTargetMax$ = 16					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Doublet PROC

; 2645 : 	char * pbTargetMax = pbTarget + cbTarget;

  009d0	8b 44 24 0c	 mov	 eax, DWORD PTR _cbTarget$[esp-4]
  009d4	53		 push	 ebx

; 2646 : 	register uint32_t ulHashPattern;
; 2647 : 	uint32_t ulHashTarget, count, countSTATIC;
; 2648 : 
; 2649 : 	if (cbPattern > cbTarget) return(NULL);

  009d5	8b 5c 24 14	 mov	 ebx, DWORD PTR _cbPattern$[esp]
  009d9	55		 push	 ebp
  009da	8b 6c 24 0c	 mov	 ebp, DWORD PTR _pbTarget$[esp+4]
  009de	8d 0c 28	 lea	 ecx, DWORD PTR [eax+ebp]
  009e1	89 4c 24 14	 mov	 DWORD PTR _pbTargetMax$[esp+4], ecx
  009e5	3b d8		 cmp	 ebx, eax
  009e7	76 05		 jbe	 SHORT $LN8@Railgun_Do
  009e9	5d		 pop	 ebp
  009ea	33 c0		 xor	 eax, eax
  009ec	5b		 pop	 ebx

; 2666 : 	}
; 2667 : }

  009ed	c3		 ret	 0
$LN8@Railgun_Do:

; 2650 : 
; 2651 : 	countSTATIC = cbPattern-2;
; 2652 : 
; 2653 : 	pbTarget = pbTarget+cbPattern;
; 2654 : 	ulHashPattern = (*(uint16_t *)(pbPattern));

  009ee	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$[esp+4]
  009f2	0f b7 02	 movzx	 eax, WORD PTR [edx]
  009f5	57		 push	 edi
  009f6	03 eb		 add	 ebp, ebx
  009f8	8b fd		 mov	 edi, ebp
  009fa	89 44 24 10	 mov	 DWORD PTR _ulHashPattern$[esp+8], eax
  009fe	2b fb		 sub	 edi, ebx
  00a00	56		 push	 esi
$LL7@Railgun_Do:

; 2655 : 
; 2656 : 	for ( ;; ) {
; 2657 : 		if ( ulHashPattern == (*(uint16_t *)(pbTarget-cbPattern)) ) {

  00a01	0f b7 0f	 movzx	 ecx, WORD PTR [edi]
  00a04	39 4c 24 14	 cmp	 DWORD PTR _ulHashPattern$[esp+12], ecx
  00a08	75 2e		 jne	 SHORT $LN2@Railgun_Do

; 2658 : 			count = countSTATIC;

  00a0a	8d 4b fe	 lea	 ecx, DWORD PTR [ebx-2]

; 2659 : 			while ( count && *(char *)(pbPattern+2+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+2+(countSTATIC-count)) ) {

  00a0d	85 c9		 test	 ecx, ecx
  00a0f	74 1a		 je	 SHORT $LN17@Railgun_Do

; 2658 : 			count = countSTATIC;

  00a11	8b 74 24 18	 mov	 esi, DWORD PTR _pbPattern$[esp+12]
  00a15	83 c6 02	 add	 esi, 2
  00a18	8d 57 02	 lea	 edx, DWORD PTR [edi+2]
  00a1b	eb 03 8d 49 00	 npad	 5
$LL4@Railgun_Do:

; 2659 : 			while ( count && *(char *)(pbPattern+2+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+2+(countSTATIC-count)) ) {

  00a20	8a 06		 mov	 al, BYTE PTR [esi]
  00a22	3a 02		 cmp	 al, BYTE PTR [edx]
  00a24	75 0e		 jne	 SHORT $LN3@Railgun_Do

; 2660 : 				count--;

  00a26	42		 inc	 edx
  00a27	46		 inc	 esi
  00a28	49		 dec	 ecx
  00a29	75 f5		 jne	 SHORT $LL4@Railgun_Do
$LN17@Railgun_Do:
  00a2b	5e		 pop	 esi
  00a2c	5f		 pop	 edi

; 2661 : 			}
; 2662 : 			if ( count == 0 ) return((pbTarget-cbPattern));

  00a2d	8b c5		 mov	 eax, ebp
  00a2f	5d		 pop	 ebp
  00a30	2b c3		 sub	 eax, ebx
  00a32	5b		 pop	 ebx

; 2666 : 	}
; 2667 : }

  00a33	c3		 ret	 0
$LN3@Railgun_Do:

; 2661 : 			}
; 2662 : 			if ( count == 0 ) return((pbTarget-cbPattern));

  00a34	85 c9		 test	 ecx, ecx
  00a36	74 f3		 je	 SHORT $LN17@Railgun_Do
$LN2@Railgun_Do:

; 2663 : 		}
; 2664 : 		pbTarget++;

  00a38	45		 inc	 ebp
  00a39	47		 inc	 edi

; 2665 : 		if (pbTarget > pbTargetMax) return(NULL);

  00a3a	3b 6c 24 1c	 cmp	 ebp, DWORD PTR _pbTargetMax$[esp+12]
  00a3e	76 c1		 jbe	 SHORT $LL7@Railgun_Do
  00a40	5e		 pop	 esi
  00a41	5f		 pop	 edi
  00a42	5d		 pop	 ebp
  00a43	33 c0		 xor	 eax, eax
  00a45	5b		 pop	 ebx

; 2666 : 	}
; 2667 : }

  00a46	c3		 ret	 0
_Railgun_Doublet ENDP
_TEXT	ENDS
PUBLIC	_Railgun_Quadruplet_8Triplet
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_Quadruplet3rd$ = -16					; size = 4
_Quadruplet4th$ = -12					; size = 4
_pbTargetMax$ = -8					; size = 4
_ulHashPattern$ = -4					; size = 4
tv401 = 8						; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_Quadruplet2nd$ = 16					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_8Triplet PROC

; 4472 : {

  00a50	83 ec 10	 sub	 esp, 16			; 00000010H

; 4473 :     char * pbTargetMax = pbTarget + cbTarget;

  00a53	8b 4c 24 1c	 mov	 ecx, DWORD PTR _cbTarget$[esp+12]
  00a57	8b 44 24 14	 mov	 eax, DWORD PTR _pbTarget$[esp+12]

; 4474 :     register uint32_t  ulHashPattern;
; 4475 :     uint32_t ulHashTarget;
; 4476 :     uint32_t count;
; 4477 :     uint32_t countSTATIC;
; 4478 : //  unsigned long countRemainder;
; 4479 : 
; 4480 : /*
; 4481 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 4482 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 4483 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 4484 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 4485 : */
; 4486 :     unsigned char SINGLET;
; 4487 :     uint32_t Quadruplet2nd;
; 4488 :     uint32_t Quadruplet3rd;
; 4489 :     uint32_t Quadruplet4th;
; 4490 : 
; 4491 :     uint32_t  AdvanceHopperGrass;
; 4492 : 
; 4493 :     long i; //BMH needed
; 4494 : //    int a, j, bm_bc[ASIZE]; //BMH needed
; 4495 : //    unsigned char ch; //BMH needed
; 4496 : //    unsigned char lastch, firstch; //BMH needed
; 4497 : 
; 4498 :     if (cbPattern > cbTarget)

  00a5b	8b 54 24 20	 mov	 edx, DWORD PTR _cbPattern$[esp+12]
  00a5f	53		 push	 ebx
  00a60	8d 1c 08	 lea	 ebx, DWORD PTR [eax+ecx]
  00a63	89 5c 24 0c	 mov	 DWORD PTR _pbTargetMax$[esp+20], ebx
  00a67	3b d1		 cmp	 edx, ecx
  00a69	76 07		 jbe	 SHORT $LN29@Railgun_Qu@2

; 4499 :         return(NULL);

  00a6b	33 c0		 xor	 eax, eax
  00a6d	5b		 pop	 ebx

; 4664 : } //if ( cbPattern<4)
; 4665 : }

  00a6e	83 c4 10	 add	 esp, 16			; 00000010H
  00a71	c3		 ret	 0
$LN29@Railgun_Qu@2:
  00a72	55		 push	 ebp
  00a73	56		 push	 esi

; 4500 : 
; 4501 : // Doesn't work when cbPattern = 1
; 4502 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 4503 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.
; 4504 :         pbTarget = pbTarget+cbPattern;

  00a74	03 c2		 add	 eax, edx
  00a76	57		 push	 edi
  00a77	83 fa 04	 cmp	 edx, 4
  00a7a	0f 83 a8 00 00
	00		 jae	 $LN28@Railgun_Qu@2

; 4505 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  00a80	8b 7c 24 28	 mov	 edi, DWORD PTR _pbPattern$[esp+28]
  00a84	0f be 0f	 movsx	 ecx, BYTE PTR [edi]
  00a87	0f be 74 17 ff	 movsx	 esi, BYTE PTR [edi+edx-1]
  00a8c	c1 e1 08	 shl	 ecx, 8
  00a8f	03 f1		 add	 esi, ecx

; 4506 : //        countSTATIC = cbPattern-2;
; 4507 : 
; 4508 : 
; 4509 : /* 
; 4510 : 8short:
; 4511 : 
; 4512 : Searching for Pattern('TDK',3bytes) into String(206908949bytes) line-by-line ...
; 4513 : 
; 4514 : strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: 0/496
; 4515 : strstr_GNU_C_Library performance: 402KB/clock
; 4516 : Railgun_Quadruplet_8Short_hits/Railgun_Quadruplet_8Short_clocks: 0/504
; 4517 : Railgun_Quadruplet_8Short performance: 396KB/clock
; 4518 : 
; 4519 : Searching for Pattern('the',3bytes) into String(206908949bytes) line-by-line ...
; 4520 : 
; 4521 : strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: 1192002/521
; 4522 : strstr_GNU_C_Library performance: 254KB/clock
; 4523 : Railgun_Quadruplet_8Short_hits/Railgun_Quadruplet_8Short_clocks: 1192002/489
; 4524 : Railgun_Quadruplet_8Short performance: 271KB/clock
; 4525 : 
; 4526 : 8Triplet:
; 4527 : 
; 4528 : Searching for Pattern('TDK',3bytes) into String(206908949bytes) line-by-line ...
; 4529 : 
; 4530 : strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: 0/504
; 4531 : strstr_GNU_C_Library performance: 396KB/clock
; 4532 : Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Triplet_clocks: 0/471
; 4533 : Railgun_Quadruplet_8Triplet performance: 423KB/clock
; 4534 : 
; 4535 : Searching for Pattern('the',3bytes) into String(206908949bytes) line-by-line ...
; 4536 : 
; 4537 : strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: 1192002/528
; 4538 : strstr_GNU_C_Library performance: 251KB/clock
; 4539 : Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Triplet_clocks: 1192002/479
; 4540 : Railgun_Quadruplet_8Triplet performance: 277KB/clock
; 4541 : 
; 4542 : */
; 4543 : if ( cbPattern==3) {

  00a91	83 fa 03	 cmp	 edx, 3
  00a94	75 4e		 jne	 SHORT $LN34@Railgun_Qu@2
  00a96	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL26@Railgun_Qu@2:

; 4544 :     for ( ;; )
; 4545 :     {
; 4546 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  00aa0	0f be 50 fd	 movsx	 edx, BYTE PTR [eax-3]
  00aa4	0f be 48 ff	 movsx	 ecx, BYTE PTR [eax-1]
  00aa8	c1 e2 08	 shl	 edx, 8
  00aab	03 d1		 add	 edx, ecx
  00aad	3b f2		 cmp	 esi, edx
  00aaf	75 08		 jne	 SHORT $LN23@Railgun_Qu@2

; 4547 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  00ab1	8a 57 01	 mov	 dl, BYTE PTR [edi+1]
  00ab4	3a 50 fe	 cmp	 dl, BYTE PTR [eax-2]
  00ab7	74 20		 je	 SHORT $LN37@Railgun_Qu@2
$LN23@Railgun_Qu@2:

; 4548 :         }
; 4549 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) { 

  00ab9	8b ce		 mov	 ecx, esi
  00abb	c1 e9 08	 shr	 ecx, 8
  00abe	3a 48 fe	 cmp	 cl, BYTE PTR [eax-2]
  00ac1	74 07		 je	 SHORT $LN21@Railgun_Qu@2

; 4550 : 		pbTarget++;

  00ac3	40		 inc	 eax

; 4551 : 	        //if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;
; 4552 : 	        if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++; // r8Triplet

  00ac4	3a 48 fe	 cmp	 cl, BYTE PTR [eax-2]
  00ac7	74 01		 je	 SHORT $LN21@Railgun_Qu@2
  00ac9	40		 inc	 eax
$LN21@Railgun_Qu@2:

; 4553 : 	}
; 4554 :         pbTarget++;

  00aca	40		 inc	 eax

; 4555 :         if (pbTarget > pbTargetMax)

  00acb	3b c3		 cmp	 eax, ebx
  00acd	76 d1		 jbe	 SHORT $LL26@Railgun_Qu@2
$LN42@Railgun_Qu@2:
  00acf	5f		 pop	 edi
  00ad0	5e		 pop	 esi
  00ad1	5d		 pop	 ebp

; 4662 :             return(NULL);

  00ad2	33 c0		 xor	 eax, eax
  00ad4	5b		 pop	 ebx

; 4664 : } //if ( cbPattern<4)
; 4665 : }

  00ad5	83 c4 10	 add	 esp, 16			; 00000010H
  00ad8	c3		 ret	 0
$LN37@Railgun_Qu@2:
  00ad9	5f		 pop	 edi
  00ada	5e		 pop	 esi
  00adb	5d		 pop	 ebp

; 4547 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  00adc	83 c0 fd	 add	 eax, -3			; fffffffdH
  00adf	5b		 pop	 ebx

; 4664 : } //if ( cbPattern<4)
; 4665 : }

  00ae0	83 c4 10	 add	 esp, 16			; 00000010H
  00ae3	c3		 ret	 0
$LN34@Railgun_Qu@2:

; 4556 :             return(NULL);
; 4557 :     }
; 4558 : } else {
; 4559 : }
; 4560 :     for ( ;; )
; 4561 :     {
; 4562 :         // The line below gives for 'cbPattern'>=1:
; 4563 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 4564 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 4565 : /*
; 4566 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 4567 :             return((long)(pbTarget-cbPattern));
; 4568 : */
; 4569 : 
; 4570 :         // The fragment below gives for 'cbPattern'>=2:
; 4571 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 4572 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 4573 : 
; 4574 : /*
; 4575 : //For 2 and 3 [
; 4576 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4577 : //         count = countSTATIC;
; 4578 :          count = cbPattern-2;
; 4579 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 4580 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 4581 :                count--;
; 4582 :          }
; 4583 :          if ( count == 0) return((pbTarget-cbPattern));
; 4584 :         }
; 4585 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 4586 : //For 2 and 3 ]
; 4587 : */
; 4588 : 
; 4589 : 
; 4590 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  00ae4	8a 48 ff	 mov	 cl, BYTE PTR [eax-1]
  00ae7	0f be 50 fe	 movsx	 edx, BYTE PTR [eax-2]
  00aeb	0f be f9	 movsx	 edi, cl
  00aee	c1 e2 08	 shl	 edx, 8
  00af1	03 d7		 add	 edx, edi
  00af3	3b f2		 cmp	 esi, edx
  00af5	74 26		 je	 SHORT $LN39@Railgun_Qu@2
  00af7	8b d6		 mov	 edx, esi
  00af9	c1 ea 08	 shr	 edx, 8
  00afc	8d 64 24 00	 npad	 4
$LL18@Railgun_Qu@2:

; 4592 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  00b00	3a d1		 cmp	 dl, cl
  00b02	74 01		 je	 SHORT $LN49@Railgun_Qu@2
  00b04	40		 inc	 eax
$LN49@Railgun_Qu@2:

; 4593 : 
; 4594 : 
; 4595 :         // The fragment below gives for 'cbPattern'>=2:
; 4596 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 4597 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 4598 : /*
; 4599 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4600 :          count = countSTATIC>>2;
; 4601 :          countRemainder = countSTATIC % 4;
; 4602 : 
; 4603 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 4604 :                count--;
; 4605 :          }
; 4606 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 4607 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 4608 :                countRemainder--;
; 4609 :          }
; 4610 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 4611 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 4612 :          //}
; 4613 :         }
; 4614 : */
; 4615 : 
; 4616 :         pbTarget++;

  00b05	40		 inc	 eax

; 4617 :         if (pbTarget > pbTargetMax)

  00b06	3b c3		 cmp	 eax, ebx
  00b08	77 c5		 ja	 SHORT $LN42@Railgun_Qu@2

; 4556 :             return(NULL);
; 4557 :     }
; 4558 : } else {
; 4559 : }
; 4560 :     for ( ;; )
; 4561 :     {
; 4562 :         // The line below gives for 'cbPattern'>=1:
; 4563 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 4564 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 4565 : /*
; 4566 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 4567 :             return((long)(pbTarget-cbPattern));
; 4568 : */
; 4569 : 
; 4570 :         // The fragment below gives for 'cbPattern'>=2:
; 4571 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 4572 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 4573 : 
; 4574 : /*
; 4575 : //For 2 and 3 [
; 4576 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4577 : //         count = countSTATIC;
; 4578 :          count = cbPattern-2;
; 4579 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 4580 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 4581 :                count--;
; 4582 :          }
; 4583 :          if ( count == 0) return((pbTarget-cbPattern));
; 4584 :         }
; 4585 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 4586 : //For 2 and 3 ]
; 4587 : */
; 4588 : 
; 4589 : 
; 4590 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  00b0a	8a 48 ff	 mov	 cl, BYTE PTR [eax-1]
  00b0d	0f be 78 fe	 movsx	 edi, BYTE PTR [eax-2]
  00b11	0f be e9	 movsx	 ebp, cl
  00b14	c1 e7 08	 shl	 edi, 8
  00b17	03 fd		 add	 edi, ebp
  00b19	3b f7		 cmp	 esi, edi
  00b1b	75 e3		 jne	 SHORT $LL18@Railgun_Qu@2
$LN39@Railgun_Qu@2:
  00b1d	5f		 pop	 edi
  00b1e	5e		 pop	 esi
  00b1f	5d		 pop	 ebp

; 4591 :             return((pbTarget-2));

  00b20	83 c0 fe	 add	 eax, -2			; fffffffeH
  00b23	5b		 pop	 ebx

; 4664 : } //if ( cbPattern<4)
; 4665 : }

  00b24	83 c4 10	 add	 esp, 16			; 00000010H
  00b27	c3		 ret	 0
$LN28@Railgun_Qu@2:

; 4618 :             return(NULL);
; 4619 :     }
; 4620 : } else { //if ( cbPattern<4)
; 4621 :         pbTarget = pbTarget+cbPattern;
; 4622 :         ulHashPattern = *(unsigned long *)(pbPattern);

  00b28	8b 4c 24 28	 mov	 ecx, DWORD PTR _pbPattern$[esp+28]
  00b2c	8b 19		 mov	 ebx, DWORD PTR [ecx]

; 4623 : //        countSTATIC = cbPattern-1;
; 4624 : 
; 4625 :     //SINGLET = *(char *)(pbPattern);
; 4626 :     SINGLET = ulHashPattern & 0xFF;
; 4627 :     Quadruplet2nd = SINGLET<<8;

  00b2e	0f b6 cb	 movzx	 ecx, bl
  00b31	8b f1		 mov	 esi, ecx
  00b33	c1 e6 08	 shl	 esi, 8
  00b36	89 74 24 2c	 mov	 DWORD PTR _Quadruplet2nd$[esp+28], esi

; 4628 :     Quadruplet3rd = SINGLET<<16;

  00b3a	8b f1		 mov	 esi, ecx
  00b3c	c1 e6 10	 shl	 esi, 16			; 00000010H
  00b3f	89 4c 24 24	 mov	 DWORD PTR tv401[esp+28], ecx

; 4629 :     Quadruplet4th = SINGLET<<24;

  00b43	c1 e1 18	 shl	 ecx, 24			; 00000018H
  00b46	89 5c 24 1c	 mov	 DWORD PTR _ulHashPattern$[esp+32], ebx
  00b4a	89 74 24 10	 mov	 DWORD PTR _Quadruplet3rd$[esp+32], esi
  00b4e	89 4c 24 14	 mov	 DWORD PTR _Quadruplet4th$[esp+32], ecx
$LL12@Railgun_Qu@2:

; 4630 : 
; 4631 :     for ( ;; )
; 4632 :     {
; 4633 : 	AdvanceHopperGrass = 0;
; 4634 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  00b52	8b c8		 mov	 ecx, eax
  00b54	2b ca		 sub	 ecx, edx
  00b56	8b 09		 mov	 ecx, DWORD PTR [ecx]
  00b58	33 ed		 xor	 ebp, ebp

; 4635 : 
; 4636 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  00b5a	3b d9		 cmp	 ebx, ecx
  00b5c	75 44		 jne	 SHORT $LN10@Railgun_Qu@2

; 4637 : //         count = countSTATIC;
; 4638 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 4639 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 4640 : //               count--;
; 4641 : //         }
; 4642 :          count = cbPattern-1;

  00b5e	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]

; 4643 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  00b61	85 c9		 test	 ecx, ecx
  00b63	74 2d		 je	 SHORT $LN44@Railgun_Qu@2

; 4637 : //         count = countSTATIC;
; 4638 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 4639 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 4640 : //               count--;
; 4641 : //         }
; 4642 :          count = cbPattern-1;

  00b65	8b 74 24 28	 mov	 esi, DWORD PTR _pbPattern$[esp+28]
  00b69	8b f8		 mov	 edi, eax
  00b6b	2b f1		 sub	 esi, ecx
  00b6d	2b f9		 sub	 edi, ecx
  00b6f	03 f2		 add	 esi, edx
$LL9@Railgun_Qu@2:

; 4643 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  00b71	8a 1f		 mov	 bl, BYTE PTR [edi]
  00b73	38 1e		 cmp	 BYTE PTR [esi], bl
  00b75	75 25		 jne	 SHORT $LN8@Railgun_Qu@2

; 4644 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  00b77	8d 1c 29	 lea	 ebx, DWORD PTR [ecx+ebp]
  00b7a	4a		 dec	 edx
  00b7b	3b d3		 cmp	 edx, ebx
  00b7d	75 0a		 jne	 SHORT $LN45@Railgun_Qu@2
  00b7f	0f be 17	 movsx	 edx, BYTE PTR [edi]
  00b82	39 54 24 24	 cmp	 DWORD PTR tv401[esp+28], edx
  00b86	74 01		 je	 SHORT $LN45@Railgun_Qu@2
  00b88	45		 inc	 ebp
$LN45@Railgun_Qu@2:

; 4643 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  00b89	8b 54 24 30	 mov	 edx, DWORD PTR _cbPattern$[esp+28]

; 4645 :                count--;

  00b8d	46		 inc	 esi
  00b8e	47		 inc	 edi
  00b8f	49		 dec	 ecx
  00b90	75 df		 jne	 SHORT $LL9@Railgun_Qu@2
$LN44@Railgun_Qu@2:
  00b92	5f		 pop	 edi
  00b93	5e		 pop	 esi
  00b94	5d		 pop	 ebp

; 4646 :          }
; 4647 :          if ( count == 0) return((pbTarget-cbPattern));

  00b95	2b c2		 sub	 eax, edx
  00b97	5b		 pop	 ebx

; 4664 : } //if ( cbPattern<4)
; 4665 : }

  00b98	83 c4 10	 add	 esp, 16			; 00000010H
  00b9b	c3		 ret	 0
$LN8@Railgun_Qu@2:

; 4646 :          }
; 4647 :          if ( count == 0) return((pbTarget-cbPattern));

  00b9c	85 c9		 test	 ecx, ecx
  00b9e	74 f2		 je	 SHORT $LN44@Railgun_Qu@2

; 4648 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  00ba0	eb 37		 jmp	 SHORT $LN47@Railgun_Qu@2
$LN10@Railgun_Qu@2:

; 4649 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  00ba2	8b f1		 mov	 esi, ecx
  00ba4	81 e6 00 ff 00
	00		 and	 esi, 65280		; 0000ff00H
  00baa	39 74 24 2c	 cmp	 DWORD PTR _Quadruplet2nd$[esp+28], esi
  00bae	74 29		 je	 SHORT $LN47@Railgun_Qu@2

; 4650 :          AdvanceHopperGrass++;
; 4651 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  00bb0	8b f1		 mov	 esi, ecx
  00bb2	81 e6 00 00 ff
	00		 and	 esi, 16711680		; 00ff0000H
  00bb8	bd 01 00 00 00	 mov	 ebp, 1
  00bbd	39 74 24 10	 cmp	 DWORD PTR _Quadruplet3rd$[esp+32], esi
  00bc1	74 16		 je	 SHORT $LN47@Railgun_Qu@2

; 4652 :               AdvanceHopperGrass++;
; 4653 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  00bc3	81 e1 00 00 00
	ff		 and	 ecx, -16777216		; ff000000H
  00bc9	bd 02 00 00 00	 mov	 ebp, 2
  00bce	39 4c 24 14	 cmp	 DWORD PTR _Quadruplet4th$[esp+32], ecx
  00bd2	74 05		 je	 SHORT $LN47@Railgun_Qu@2
  00bd4	bd 03 00 00 00	 mov	 ebp, 3
$LN47@Railgun_Qu@2:

; 4654 :          }
; 4655 :     }
; 4656 : 	}
; 4657 : 
; 4658 : 	AdvanceHopperGrass++;
; 4659 : 
; 4660 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  00bd9	8d 44 28 01	 lea	 eax, DWORD PTR [eax+ebp+1]

; 4661 :         if (pbTarget > pbTargetMax)

  00bdd	3b 44 24 18	 cmp	 eax, DWORD PTR _pbTargetMax$[esp+32]
  00be1	0f 87 e8 fe ff
	ff		 ja	 $LN42@Railgun_Qu@2

; 4663 :     }

  00be7	8b 5c 24 1c	 mov	 ebx, DWORD PTR _ulHashPattern$[esp+32]
  00beb	e9 62 ff ff ff	 jmp	 $LL12@Railgun_Qu@2
_Railgun_Quadruplet_8Triplet ENDP
_TEXT	ENDS
PUBLIC	_Railgun_Mischa_8Triplet
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_ulHashPattern$ = 8					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_AdvanceHopperGrass$ = 16				; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Mischa_8Triplet PROC

; 4675 :     char * pbTargetMax = pbTarget + cbTarget;

  00bf0	8b 4c 24 0c	 mov	 ecx, DWORD PTR _cbTarget$[esp-4]
  00bf4	8b 44 24 04	 mov	 eax, DWORD PTR _pbTarget$[esp-4]
  00bf8	53		 push	 ebx

; 4676 :     register uint32_t  ulHashPattern;
; 4677 :     uint32_t ulHashTarget;
; 4678 :     uint32_t count;
; 4679 :     uint32_t countSTATIC;
; 4680 : //  unsigned long countRemainder;
; 4681 : 
; 4682 : /*
; 4683 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 4684 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 4685 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 4686 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 4687 : */
; 4688 :     unsigned char SINGLET;
; 4689 :     uint32_t Quadruplet2nd;
; 4690 :     uint32_t Quadruplet3rd;
; 4691 :     uint32_t Quadruplet4th;
; 4692 : 
; 4693 :     uint32_t  AdvanceHopperGrass;
; 4694 : 
; 4695 :     long i; //BMH needed
; 4696 : //    int a, j, bm_bc[ASIZE]; //BMH needed
; 4697 : //    unsigned char ch; //BMH needed
; 4698 : //    unsigned char lastch, firstch; //BMH needed
; 4699 : 
; 4700 :     if (cbPattern > cbTarget)

  00bf9	8b 5c 24 14	 mov	 ebx, DWORD PTR _cbPattern$[esp]
  00bfd	57		 push	 edi
  00bfe	8d 3c 08	 lea	 edi, DWORD PTR [eax+ecx]
  00c01	3b d9		 cmp	 ebx, ecx
  00c03	76 05		 jbe	 SHORT $LN20@Railgun_Mi

; 4701 :         return(NULL);

  00c05	5f		 pop	 edi
  00c06	33 c0		 xor	 eax, eax
  00c08	5b		 pop	 ebx

; 4852 : } //if ( cbPattern<4)
; 4853 : }

  00c09	c3		 ret	 0
$LN20@Railgun_Mi:
  00c0a	55		 push	 ebp
  00c0b	56		 push	 esi

; 4702 : 
; 4703 : // Doesn't work when cbPattern = 1
; 4704 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 4705 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  00c0c	83 fb 04	 cmp	 ebx, 4
  00c0f	0f 83 96 00 00
	00		 jae	 $LN19@Railgun_Mi

; 4706 :         pbTarget = pbTarget+cbPattern;
; 4707 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  00c15	8b 54 24 18	 mov	 edx, DWORD PTR _pbPattern$[esp+12]
  00c19	0f be 0a	 movsx	 ecx, BYTE PTR [edx]
  00c1c	0f be 74 1a ff	 movsx	 esi, BYTE PTR [edx+ebx-1]
  00c21	c1 e1 08	 shl	 ecx, 8
  00c24	03 c3		 add	 eax, ebx
  00c26	03 f1		 add	 esi, ecx

; 4708 : //        countSTATIC = cbPattern-2;
; 4709 : 
; 4710 : 
; 4711 : /* 
; 4712 : 8short:
; 4713 : 
; 4714 : Searching for Pattern('TDK',3bytes) into String(206908949bytes) line-by-line ...
; 4715 : 
; 4716 : strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: 0/496
; 4717 : strstr_GNU_C_Library performance: 402KB/clock
; 4718 : Railgun_Quadruplet_8Short_hits/Railgun_Quadruplet_8Short_clocks: 0/504
; 4719 : Railgun_Quadruplet_8Short performance: 396KB/clock
; 4720 : 
; 4721 : Searching for Pattern('the',3bytes) into String(206908949bytes) line-by-line ...
; 4722 : 
; 4723 : strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: 1192002/521
; 4724 : strstr_GNU_C_Library performance: 254KB/clock
; 4725 : Railgun_Quadruplet_8Short_hits/Railgun_Quadruplet_8Short_clocks: 1192002/489
; 4726 : Railgun_Quadruplet_8Short performance: 271KB/clock
; 4727 : 
; 4728 : 8Triplet:
; 4729 : 
; 4730 : Searching for Pattern('TDK',3bytes) into String(206908949bytes) line-by-line ...
; 4731 : 
; 4732 : strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: 0/504
; 4733 : strstr_GNU_C_Library performance: 396KB/clock
; 4734 : Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Triplet_clocks: 0/471
; 4735 : Railgun_Quadruplet_8Triplet performance: 423KB/clock
; 4736 : 
; 4737 : Searching for Pattern('the',3bytes) into String(206908949bytes) line-by-line ...
; 4738 : 
; 4739 : strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: 1192002/528
; 4740 : strstr_GNU_C_Library performance: 251KB/clock
; 4741 : Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Triplet_clocks: 1192002/479
; 4742 : Railgun_Quadruplet_8Triplet performance: 277KB/clock
; 4743 : 
; 4744 : */
; 4745 : if ( cbPattern==3) {

  00c28	83 fb 03	 cmp	 ebx, 3
  00c2b	75 41		 jne	 SHORT $LN29@Railgun_Mi
  00c2d	8d 49 00	 npad	 3
$LL17@Railgun_Mi:

; 4746 :     for ( ;; )
; 4747 :     {
; 4748 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  00c30	0f be 48 fd	 movsx	 ecx, BYTE PTR [eax-3]
  00c34	0f be 58 ff	 movsx	 ebx, BYTE PTR [eax-1]
  00c38	c1 e1 08	 shl	 ecx, 8
  00c3b	03 cb		 add	 ecx, ebx
  00c3d	3b f1		 cmp	 esi, ecx
  00c3f	75 08		 jne	 SHORT $LN14@Railgun_Mi

; 4749 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  00c41	8a 4a 01	 mov	 cl, BYTE PTR [edx+1]
  00c44	3a 48 fe	 cmp	 cl, BYTE PTR [eax-2]
  00c47	74 1d		 je	 SHORT $LN32@Railgun_Mi
$LN14@Railgun_Mi:

; 4750 :         }
; 4751 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) { 

  00c49	8b ce		 mov	 ecx, esi
  00c4b	c1 e9 08	 shr	 ecx, 8
  00c4e	3a 48 fe	 cmp	 cl, BYTE PTR [eax-2]
  00c51	74 07		 je	 SHORT $LN39@Railgun_Mi

; 4752 : 		pbTarget++;

  00c53	40		 inc	 eax

; 4753 : 	        //if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;
; 4754 : 	        if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++; // r8Triplet

  00c54	3a 48 fe	 cmp	 cl, BYTE PTR [eax-2]
  00c57	74 01		 je	 SHORT $LN39@Railgun_Mi
  00c59	40		 inc	 eax
$LN39@Railgun_Mi:

; 4755 : 	}
; 4756 :         pbTarget++;

  00c5a	40		 inc	 eax

; 4757 :         if (pbTarget > pbTargetMax)

  00c5b	3b c7		 cmp	 eax, edi
  00c5d	76 d1		 jbe	 SHORT $LL17@Railgun_Mi
$LN38@Railgun_Mi:
  00c5f	5e		 pop	 esi
  00c60	5d		 pop	 ebp
  00c61	5f		 pop	 edi

; 4850 : 			}
; 4851 : 			return  NULL;

  00c62	33 c0		 xor	 eax, eax
  00c64	5b		 pop	 ebx

; 4852 : } //if ( cbPattern<4)
; 4853 : }

  00c65	c3		 ret	 0
$LN32@Railgun_Mi:
  00c66	5e		 pop	 esi
  00c67	5d		 pop	 ebp
  00c68	5f		 pop	 edi

; 4749 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  00c69	83 c0 fd	 add	 eax, -3			; fffffffdH
  00c6c	5b		 pop	 ebx

; 4852 : } //if ( cbPattern<4)
; 4853 : }

  00c6d	c3		 ret	 0
$LN29@Railgun_Mi:

; 4758 :             return(NULL);
; 4759 :     }
; 4760 : } else {
; 4761 : }
; 4762 :     for ( ;; )
; 4763 :     {
; 4764 :         // The line below gives for 'cbPattern'>=1:
; 4765 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 4766 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 4767 : /*
; 4768 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 4769 :             return((long)(pbTarget-cbPattern));
; 4770 : */
; 4771 : 
; 4772 :         // The fragment below gives for 'cbPattern'>=2:
; 4773 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 4774 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 4775 : 
; 4776 : /*
; 4777 : //For 2 and 3 [
; 4778 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4779 : //         count = countSTATIC;
; 4780 :          count = cbPattern-2;
; 4781 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 4782 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 4783 :                count--;
; 4784 :          }
; 4785 :          if ( count == 0) return((pbTarget-cbPattern));
; 4786 :         }
; 4787 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 4788 : //For 2 and 3 ]
; 4789 : */
; 4790 : 
; 4791 : 
; 4792 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  00c6e	8a 48 ff	 mov	 cl, BYTE PTR [eax-1]
  00c71	0f be 50 fe	 movsx	 edx, BYTE PTR [eax-2]
  00c75	0f be d9	 movsx	 ebx, cl
  00c78	c1 e2 08	 shl	 edx, 8
  00c7b	03 d3		 add	 edx, ebx
  00c7d	3b f2		 cmp	 esi, edx
  00c7f	74 22		 je	 SHORT $LN34@Railgun_Mi
  00c81	8b d6		 mov	 edx, esi
  00c83	c1 ea 08	 shr	 edx, 8
$LL9@Railgun_Mi:

; 4794 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  00c86	3a d1		 cmp	 dl, cl
  00c88	74 01		 je	 SHORT $LN40@Railgun_Mi
  00c8a	40		 inc	 eax
$LN40@Railgun_Mi:

; 4795 : 
; 4796 : 
; 4797 :         // The fragment below gives for 'cbPattern'>=2:
; 4798 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 4799 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 4800 : /*
; 4801 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4802 :          count = countSTATIC>>2;
; 4803 :          countRemainder = countSTATIC % 4;
; 4804 : 
; 4805 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 4806 :                count--;
; 4807 :          }
; 4808 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 4809 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 4810 :                countRemainder--;
; 4811 :          }
; 4812 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 4813 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 4814 :          //}
; 4815 :         }
; 4816 : */
; 4817 : 
; 4818 :         pbTarget++;

  00c8b	40		 inc	 eax

; 4819 :         if (pbTarget > pbTargetMax)

  00c8c	3b c7		 cmp	 eax, edi
  00c8e	77 cf		 ja	 SHORT $LN38@Railgun_Mi

; 4758 :             return(NULL);
; 4759 :     }
; 4760 : } else {
; 4761 : }
; 4762 :     for ( ;; )
; 4763 :     {
; 4764 :         // The line below gives for 'cbPattern'>=1:
; 4765 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 4766 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 4767 : /*
; 4768 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 4769 :             return((long)(pbTarget-cbPattern));
; 4770 : */
; 4771 : 
; 4772 :         // The fragment below gives for 'cbPattern'>=2:
; 4773 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 4774 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 4775 : 
; 4776 : /*
; 4777 : //For 2 and 3 [
; 4778 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4779 : //         count = countSTATIC;
; 4780 :          count = cbPattern-2;
; 4781 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 4782 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 4783 :                count--;
; 4784 :          }
; 4785 :          if ( count == 0) return((pbTarget-cbPattern));
; 4786 :         }
; 4787 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 4788 : //For 2 and 3 ]
; 4789 : */
; 4790 : 
; 4791 : 
; 4792 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  00c90	8a 48 ff	 mov	 cl, BYTE PTR [eax-1]
  00c93	0f be 58 fe	 movsx	 ebx, BYTE PTR [eax-2]
  00c97	0f be e9	 movsx	 ebp, cl
  00c9a	c1 e3 08	 shl	 ebx, 8
  00c9d	03 dd		 add	 ebx, ebp
  00c9f	3b f3		 cmp	 esi, ebx
  00ca1	75 e3		 jne	 SHORT $LL9@Railgun_Mi
$LN34@Railgun_Mi:
  00ca3	5e		 pop	 esi
  00ca4	5d		 pop	 ebp
  00ca5	5f		 pop	 edi

; 4793 :             return((pbTarget-2));

  00ca6	83 c0 fe	 add	 eax, -2			; fffffffeH
  00ca9	5b		 pop	 ebx

; 4852 : } //if ( cbPattern<4)
; 4853 : }

  00caa	c3		 ret	 0
$LN19@Railgun_Mi:

; 4820 :             return(NULL);
; 4821 :     }
; 4822 : } else { //if ( cbPattern<4)
; 4823 : 			// A better strstr, with no asm code
; 4824 : 			// Written by Mischa Sandberg
; 4825 : 			// http://mischasan.wordpress.com
; 4826 : 			// static char const *
; 4827 : 			// scanstrm(char const *tgt, char const *pat, int len)
; 4828 : 			// {
; 4829 : 			//     uint32_t head = MSBF32(pat), wind = 0, next;
; 4830 : 			// 
; 4831 : 			//     pat += 4, len -= 4;
; 4832 : 			//     while ((next = *(uint8_t const*)tgt++)) {
; 4833 : 			//         wind = ( wind << 8 ) + next;
; 4834 : 			//         if (wind == head && !memcmp(tgt, pat, len))
; 4835 : 			//             return tgt - 4;
; 4836 : 			//     }
; 4837 : 			//     return  NULL;
; 4838 : 			//}
; 4839 : 			ulHashPattern = 0;
; 4840 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;

  00cab	8b 4c 24 18	 mov	 ecx, DWORD PTR _pbPattern$[esp+12]
  00caf	0f b6 11	 movzx	 edx, BYTE PTR [ecx]

; 4841 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;

  00cb2	0f b6 71 01	 movzx	 esi, BYTE PTR [ecx+1]
  00cb6	c1 e2 08	 shl	 edx, 8
  00cb9	03 d6		 add	 edx, esi

; 4842 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;

  00cbb	0f b6 71 02	 movzx	 esi, BYTE PTR [ecx+2]
  00cbf	c1 e2 08	 shl	 edx, 8
  00cc2	03 d6		 add	 edx, esi

; 4843 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;

  00cc4	0f b6 71 03	 movzx	 esi, BYTE PTR [ecx+3]
  00cc8	c1 e2 08	 shl	 edx, 8
  00ccb	03 d6		 add	 edx, esi

; 4844 : 			AdvanceHopperGrass = 0;
; 4845 : 			cbPattern -= 4;
; 4846 : 			while ((ulHashTarget = *(uint8_t const*)pbTarget++)) {

  00ccd	0f b6 30	 movzx	 esi, BYTE PTR [eax]
  00cd0	89 54 24 14	 mov	 DWORD PTR _ulHashPattern$[esp+12], edx
  00cd4	33 d2		 xor	 edx, edx
  00cd6	83 eb 04	 sub	 ebx, 4
  00cd9	85 f6		 test	 esi, esi
  00cdb	74 82		 je	 SHORT $LN38@Railgun_Mi
  00cdd	8d 49 00	 npad	 3
$LL3@Railgun_Mi:

; 4847 : 				AdvanceHopperGrass = ( AdvanceHopperGrass << 8 ) + ulHashTarget;

  00ce0	c1 e2 08	 shl	 edx, 8
  00ce3	03 d6		 add	 edx, esi
  00ce5	40		 inc	 eax
  00ce6	89 54 24 1c	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+12], edx

; 4848 : 				if (AdvanceHopperGrass == ulHashPattern && !memcmp(pbTarget, pbPattern, cbPattern))

  00cea	3b 54 24 14	 cmp	 edx, DWORD PTR _ulHashPattern$[esp+12]
  00cee	75 4e		 jne	 SHORT $LN1@Railgun_Mi
  00cf0	8b f3		 mov	 esi, ebx
  00cf2	8d 79 04	 lea	 edi, DWORD PTR [ecx+4]
  00cf5	8b e8		 mov	 ebp, eax
  00cf7	83 fb 04	 cmp	 ebx, 4
  00cfa	72 19		 jb	 SHORT $LN36@Railgun_Mi
  00cfc	8d 64 24 00	 npad	 4
$LL24@Railgun_Mi:
  00d00	8b 55 00	 mov	 edx, DWORD PTR [ebp]
  00d03	3b 17		 cmp	 edx, DWORD PTR [edi]
  00d05	75 33		 jne	 SHORT $LN41@Railgun_Mi
  00d07	83 ee 04	 sub	 esi, 4
  00d0a	83 c7 04	 add	 edi, 4
  00d0d	83 c5 04	 add	 ebp, 4
  00d10	83 fe 04	 cmp	 esi, 4
  00d13	73 eb		 jae	 SHORT $LL24@Railgun_Mi
$LN36@Railgun_Mi:
  00d15	85 f6		 test	 esi, esi
  00d17	74 33		 je	 SHORT $LN26@Railgun_Mi
  00d19	8a 17		 mov	 dl, BYTE PTR [edi]
  00d1b	3a 55 00	 cmp	 dl, BYTE PTR [ebp]
  00d1e	75 1a		 jne	 SHORT $LN41@Railgun_Mi
  00d20	83 fe 01	 cmp	 esi, 1
  00d23	76 27		 jbe	 SHORT $LN26@Railgun_Mi
  00d25	8a 57 01	 mov	 dl, BYTE PTR [edi+1]
  00d28	3a 55 01	 cmp	 dl, BYTE PTR [ebp+1]
  00d2b	75 0d		 jne	 SHORT $LN41@Railgun_Mi
  00d2d	83 fe 02	 cmp	 esi, 2
  00d30	76 1a		 jbe	 SHORT $LN26@Railgun_Mi
  00d32	8a 57 02	 mov	 dl, BYTE PTR [edi+2]
  00d35	3a 55 02	 cmp	 dl, BYTE PTR [ebp+2]
  00d38	74 12		 je	 SHORT $LN26@Railgun_Mi
$LN41@Railgun_Mi:
  00d3a	8b 54 24 1c	 mov	 edx, DWORD PTR _AdvanceHopperGrass$[esp+12]
$LN1@Railgun_Mi:

; 4844 : 			AdvanceHopperGrass = 0;
; 4845 : 			cbPattern -= 4;
; 4846 : 			while ((ulHashTarget = *(uint8_t const*)pbTarget++)) {

  00d3e	0f b6 30	 movzx	 esi, BYTE PTR [eax]
  00d41	85 f6		 test	 esi, esi
  00d43	75 9b		 jne	 SHORT $LL3@Railgun_Mi

; 4850 : 			}
; 4851 : 			return  NULL;

  00d45	5e		 pop	 esi
  00d46	5d		 pop	 ebp
  00d47	5f		 pop	 edi
  00d48	33 c0		 xor	 eax, eax
  00d4a	5b		 pop	 ebx

; 4852 : } //if ( cbPattern<4)
; 4853 : }

  00d4b	c3		 ret	 0
$LN26@Railgun_Mi:
  00d4c	5e		 pop	 esi
  00d4d	5d		 pop	 ebp
  00d4e	5f		 pop	 edi

; 4849 : 				return pbTarget - 4;

  00d4f	83 c0 fc	 add	 eax, -4			; fffffffcH
  00d52	5b		 pop	 ebx

; 4852 : } //if ( cbPattern<4)
; 4853 : }

  00d53	c3		 ret	 0
_Railgun_Mischa_8Triplet ENDP
_TEXT	ENDS
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_6ppMischa
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_countSTATIC$ = -1044					; size = 4
_AdvanceHopperGrass$ = -1044				; size = 4
tv360 = -1040						; size = 4
_ulHashPattern$ = -1040					; size = 4
tv563 = -1036						; size = 4
$T9733 = -1032						; size = 4
_bm_bc$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_6ppMischa PROC

; 4863 : {

  00d60	81 ec 14 04 00
	00		 sub	 esp, 1044		; 00000414H
  00d66	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  00d6b	33 c4		 xor	 eax, esp
  00d6d	89 84 24 10 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1044], eax

; 4864 :     char * pbTargetMax = pbTarget + cbTarget;
; 4865 :     register unsigned long  ulHashPattern;
; 4866 :     unsigned long ulHashTarget;
; 4867 :     //unsigned long count; //r.6+
; 4868 :     signed long count;
; 4869 :     //unsigned long countSTATIC; //r.6+
; 4870 :     signed long countSTATIC;
; 4871 : //  unsigned long countRemainder;
; 4872 : 
; 4873 : /*
; 4874 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 4875 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 4876 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 4877 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 4878 : */
; 4879 :     unsigned char SINGLET;
; 4880 :     unsigned long Quadruplet2nd;
; 4881 :     unsigned long Quadruplet3rd;
; 4882 :     unsigned long Quadruplet4th;
; 4883 : 
; 4884 :     unsigned long  AdvanceHopperGrass;
; 4885 : 
; 4886 :     long i; //BMH needed
; 4887 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 4888 :     unsigned char ch; //BMH needed
; 4889 : //    unsigned char lastch, firstch; //BMH needed
; 4890 : 
; 4891 :     if (cbPattern > cbTarget)

  00d74	8b 84 24 24 04
	00 00		 mov	 eax, DWORD PTR _cbPattern$[esp+1040]
  00d7b	8b 94 24 1c 04
	00 00		 mov	 edx, DWORD PTR _pbPattern$[esp+1040]
  00d82	53		 push	 ebx
  00d83	8b 9c 24 24 04
	00 00		 mov	 ebx, DWORD PTR _cbTarget$[esp+1044]
  00d8a	56		 push	 esi
  00d8b	8b b4 24 20 04
	00 00		 mov	 esi, DWORD PTR _pbTarget$[esp+1048]
  00d92	57		 push	 edi
  00d93	8d 3c 1e	 lea	 edi, DWORD PTR [esi+ebx]
  00d96	3b c3		 cmp	 eax, ebx
  00d98	76 1a		 jbe	 SHORT $LN33@Railgun_Qu@3

; 4892 :         return(NULL);

  00d9a	5f		 pop	 edi
  00d9b	5e		 pop	 esi
  00d9c	33 c0		 xor	 eax, eax
  00d9e	5b		 pop	 ebx

; 5043 : } //if (cbTarget<961)
; 5044 : } //if ( cbPattern<4)
; 5045 : }

  00d9f	8b 8c 24 10 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1044]
  00da6	33 cc		 xor	 ecx, esp
  00da8	e8 00 00 00 00	 call	 @__security_check_cookie@4
  00dad	81 c4 14 04 00
	00		 add	 esp, 1044		; 00000414H
  00db3	c3		 ret	 0
$LN33@Railgun_Qu@3:
  00db4	55		 push	 ebp

; 4893 : 
; 4894 : // Doesn't work when cbPattern = 1
; 4895 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 4896 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  00db5	83 f8 04	 cmp	 eax, 4
  00db8	0f 83 97 00 00
	00		 jae	 $LN32@Railgun_Qu@3

; 4897 :         pbTarget = pbTarget+cbPattern;
; 4898 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  00dbe	0f be 1a	 movsx	 ebx, BYTE PTR [edx]
  00dc1	0f be 4c 02 ff	 movsx	 ecx, BYTE PTR [edx+eax-1]
  00dc6	c1 e3 08	 shl	 ebx, 8
  00dc9	03 f0		 add	 esi, eax
  00dcb	03 cb		 add	 ecx, ebx

; 4899 : //        countSTATIC = cbPattern-2;
; 4900 : 
; 4901 : if ( cbPattern==3) {

  00dcd	83 f8 03	 cmp	 eax, 3
  00dd0	75 49		 jne	 SHORT $LN42@Railgun_Qu@3
$LL30@Railgun_Qu@3:

; 4902 :     for ( ;; )
; 4903 :     {
; 4904 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  00dd2	0f be 46 fd	 movsx	 eax, BYTE PTR [esi-3]
  00dd6	0f be 5e ff	 movsx	 ebx, BYTE PTR [esi-1]
  00dda	c1 e0 08	 shl	 eax, 8
  00ddd	03 c3		 add	 eax, ebx
  00ddf	3b c8		 cmp	 ecx, eax
  00de1	75 08		 jne	 SHORT $LN27@Railgun_Qu@3

; 4905 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  00de3	8a 42 01	 mov	 al, BYTE PTR [edx+1]
  00de6	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  00de9	74 2b		 je	 SHORT $LN49@Railgun_Qu@3
$LN27@Railgun_Qu@3:

; 4906 :         }
; 4907 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  00deb	8b c1		 mov	 eax, ecx
  00ded	c1 e8 08	 shr	 eax, 8
  00df0	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  00df3	74 01		 je	 SHORT $LN26@Railgun_Qu@3
  00df5	46		 inc	 esi
$LN26@Railgun_Qu@3:

; 4908 :         pbTarget++;

  00df6	46		 inc	 esi

; 4909 :         if (pbTarget > pbTargetMax)

  00df7	3b f7		 cmp	 esi, edi
  00df9	76 d7		 jbe	 SHORT $LL30@Railgun_Qu@3
$LN5@Railgun_Qu@3:

; 5041 :     }
; 5042 :     return(NULL);

  00dfb	33 c0		 xor	 eax, eax
$LN69@Railgun_Qu@3:

; 5043 : } //if (cbTarget<961)
; 5044 : } //if ( cbPattern<4)
; 5045 : }

  00dfd	8b 8c 24 20 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1060]
  00e04	5d		 pop	 ebp
  00e05	5f		 pop	 edi
  00e06	5e		 pop	 esi
  00e07	5b		 pop	 ebx
  00e08	33 cc		 xor	 ecx, esp
  00e0a	e8 00 00 00 00	 call	 @__security_check_cookie@4
  00e0f	81 c4 14 04 00
	00		 add	 esp, 1044		; 00000414H
  00e15	c3		 ret	 0
$LN49@Railgun_Qu@3:

; 4905 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  00e16	8d 46 fd	 lea	 eax, DWORD PTR [esi-3]

; 4910 :             return(NULL);

  00e19	eb e2		 jmp	 SHORT $LN69@Railgun_Qu@3
$LN42@Railgun_Qu@3:

; 4911 :     }
; 4912 : } else {
; 4913 : }
; 4914 :     for ( ;; )
; 4915 :     {
; 4916 :         // The line below gives for 'cbPattern'>=1:
; 4917 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 4918 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 4919 : /*
; 4920 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 4921 :             return((long)(pbTarget-cbPattern));
; 4922 : */
; 4923 : 
; 4924 :         // The fragment below gives for 'cbPattern'>=2:
; 4925 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 4926 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 4927 : 
; 4928 : /*
; 4929 : //For 2 and 3 [
; 4930 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4931 : //         count = countSTATIC;
; 4932 :          count = cbPattern-2;
; 4933 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 4934 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 4935 :                count--;
; 4936 :          }
; 4937 :          if ( count == 0) return((pbTarget-cbPattern));
; 4938 :         }
; 4939 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 4940 : //For 2 and 3 ]
; 4941 : */
; 4942 : 
; 4943 : 
; 4944 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  00e1b	8a 46 ff	 mov	 al, BYTE PTR [esi-1]
  00e1e	0f be 56 fe	 movsx	 edx, BYTE PTR [esi-2]
  00e22	0f be d8	 movsx	 ebx, al
  00e25	c1 e2 08	 shl	 edx, 8
  00e28	03 d3		 add	 edx, ebx
  00e2a	3b ca		 cmp	 ecx, edx
  00e2c	74 22		 je	 SHORT $LN51@Railgun_Qu@3
  00e2e	8b d1		 mov	 edx, ecx
  00e30	c1 ea 08	 shr	 edx, 8
$LL23@Railgun_Qu@3:

; 4946 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  00e33	3a d0		 cmp	 dl, al
  00e35	74 01		 je	 SHORT $LN68@Railgun_Qu@3
  00e37	46		 inc	 esi
$LN68@Railgun_Qu@3:

; 4947 : 
; 4948 : 
; 4949 :         // The fragment below gives for 'cbPattern'>=2:
; 4950 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 4951 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 4952 : /*
; 4953 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4954 :          count = countSTATIC>>2;
; 4955 :          countRemainder = countSTATIC % 4;
; 4956 : 
; 4957 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 4958 :                count--;
; 4959 :          }
; 4960 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 4961 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 4962 :                countRemainder--;
; 4963 :          }
; 4964 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 4965 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 4966 :          //}
; 4967 :         }
; 4968 : */
; 4969 : 
; 4970 :         pbTarget++;

  00e38	46		 inc	 esi

; 4971 :         if (pbTarget > pbTargetMax)

  00e39	3b f7		 cmp	 esi, edi
  00e3b	77 be		 ja	 SHORT $LN5@Railgun_Qu@3

; 4911 :     }
; 4912 : } else {
; 4913 : }
; 4914 :     for ( ;; )
; 4915 :     {
; 4916 :         // The line below gives for 'cbPattern'>=1:
; 4917 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 4918 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 4919 : /*
; 4920 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 4921 :             return((long)(pbTarget-cbPattern));
; 4922 : */
; 4923 : 
; 4924 :         // The fragment below gives for 'cbPattern'>=2:
; 4925 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 4926 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 4927 : 
; 4928 : /*
; 4929 : //For 2 and 3 [
; 4930 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 4931 : //         count = countSTATIC;
; 4932 :          count = cbPattern-2;
; 4933 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 4934 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 4935 :                count--;
; 4936 :          }
; 4937 :          if ( count == 0) return((pbTarget-cbPattern));
; 4938 :         }
; 4939 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 4940 : //For 2 and 3 ]
; 4941 : */
; 4942 : 
; 4943 : 
; 4944 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  00e3d	8a 46 ff	 mov	 al, BYTE PTR [esi-1]
  00e40	0f be 5e fe	 movsx	 ebx, BYTE PTR [esi-2]
  00e44	0f be e8	 movsx	 ebp, al
  00e47	c1 e3 08	 shl	 ebx, 8
  00e4a	03 dd		 add	 ebx, ebp
  00e4c	3b cb		 cmp	 ecx, ebx
  00e4e	75 e3		 jne	 SHORT $LL23@Railgun_Qu@3
$LN51@Railgun_Qu@3:

; 4945 :             return((pbTarget-2));

  00e50	8d 46 fe	 lea	 eax, DWORD PTR [esi-2]

; 4972 :             return(NULL);

  00e53	eb a8		 jmp	 SHORT $LN69@Railgun_Qu@3
$LN32@Railgun_Qu@3:

; 4973 :     }
; 4974 : } else { //if ( cbPattern<4)
; 4975 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  00e55	81 fb c1 03 00
	00		 cmp	 ebx, 961		; 000003c1H
  00e5b	0f 83 a1 00 00
	00		 jae	 $LN17@Railgun_Qu@3

; 4976 : {
; 4977 : 			// A better strstr, with no asm code
; 4978 : 			// Written by Mischa Sandberg
; 4979 : 			// http://mischasan.wordpress.com
; 4980 : 			// static char const *
; 4981 : 			// scanstrm(char const *tgt, char const *pat, int len)
; 4982 : 			// {
; 4983 : 			//     uint32_t head = MSBF32(pat), wind = 0, next;
; 4984 : 			// 
; 4985 : 			//     pat += 4, len -= 4;
; 4986 : 			//     while ((next = *(uint8_t const*)tgt++)) {
; 4987 : 			//         wind = ( wind << 8 ) + next;
; 4988 : 			//         if (wind == head && !memcmp(tgt, pat, len))
; 4989 : 			//             return tgt - 4;
; 4990 : 			//     }
; 4991 : 			//     return  NULL;
; 4992 : 			//}
; 4993 : 			ulHashPattern = 0;
; 4994 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;

  00e61	0f b6 0a	 movzx	 ecx, BYTE PTR [edx]

; 4995 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;

  00e64	0f b6 7a 01	 movzx	 edi, BYTE PTR [edx+1]
  00e68	c1 e1 08	 shl	 ecx, 8
  00e6b	03 cf		 add	 ecx, edi

; 4996 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;

  00e6d	0f b6 7a 02	 movzx	 edi, BYTE PTR [edx+2]
  00e71	c1 e1 08	 shl	 ecx, 8
  00e74	03 cf		 add	 ecx, edi

; 4997 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;

  00e76	0f b6 7a 03	 movzx	 edi, BYTE PTR [edx+3]
  00e7a	c1 e1 08	 shl	 ecx, 8
  00e7d	03 cf		 add	 ecx, edi

; 4998 : 			AdvanceHopperGrass = 0;
; 4999 : 			cbPattern -= 4;
; 5000 : 			while ((ulHashTarget = *(uint8_t const*)pbTarget++)) {

  00e7f	0f b6 3e	 movzx	 edi, BYTE PTR [esi]
  00e82	89 4c 24 14	 mov	 DWORD PTR _ulHashPattern$[esp+1060], ecx
  00e86	33 c9		 xor	 ecx, ecx
  00e88	83 e8 04	 sub	 eax, 4
  00e8b	85 ff		 test	 edi, edi
  00e8d	0f 84 68 ff ff
	ff		 je	 $LN5@Railgun_Qu@3
$LL16@Railgun_Qu@3:

; 5001 : 				AdvanceHopperGrass = ( AdvanceHopperGrass << 8 ) + ulHashTarget;

  00e93	c1 e1 08	 shl	 ecx, 8
  00e96	03 cf		 add	 ecx, edi
  00e98	46		 inc	 esi
  00e99	89 4c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1060], ecx

; 5002 : 				if (AdvanceHopperGrass == ulHashPattern && !memcmp(pbTarget, pbPattern, cbPattern))

  00e9d	3b 4c 24 14	 cmp	 ecx, DWORD PTR _ulHashPattern$[esp+1060]
  00ea1	75 4b		 jne	 SHORT $LN14@Railgun_Qu@3
  00ea3	8b f8		 mov	 edi, eax
  00ea5	8d 6a 04	 lea	 ebp, DWORD PTR [edx+4]
  00ea8	8b ce		 mov	 ecx, esi
  00eaa	83 f8 04	 cmp	 eax, 4
  00ead	72 16		 jb	 SHORT $LN53@Railgun_Qu@3
  00eaf	90		 npad	 1
$LL37@Railgun_Qu@3:
  00eb0	8b 19		 mov	 ebx, DWORD PTR [ecx]
  00eb2	3b 5d 00	 cmp	 ebx, DWORD PTR [ebp]
  00eb5	75 33		 jne	 SHORT $LN62@Railgun_Qu@3
  00eb7	83 ef 04	 sub	 edi, 4
  00eba	83 c5 04	 add	 ebp, 4
  00ebd	83 c1 04	 add	 ecx, 4
  00ec0	83 ff 04	 cmp	 edi, 4
  00ec3	73 eb		 jae	 SHORT $LL37@Railgun_Qu@3
$LN53@Railgun_Qu@3:
  00ec5	85 ff		 test	 edi, edi
  00ec7	74 31		 je	 SHORT $LN39@Railgun_Qu@3
  00ec9	8a 5d 00	 mov	 bl, BYTE PTR [ebp]
  00ecc	3a 19		 cmp	 bl, BYTE PTR [ecx]
  00ece	75 1a		 jne	 SHORT $LN62@Railgun_Qu@3
  00ed0	83 ff 01	 cmp	 edi, 1
  00ed3	76 25		 jbe	 SHORT $LN39@Railgun_Qu@3
  00ed5	8a 5d 01	 mov	 bl, BYTE PTR [ebp+1]
  00ed8	3a 59 01	 cmp	 bl, BYTE PTR [ecx+1]
  00edb	75 0d		 jne	 SHORT $LN62@Railgun_Qu@3
  00edd	83 ff 02	 cmp	 edi, 2
  00ee0	76 18		 jbe	 SHORT $LN39@Railgun_Qu@3
  00ee2	8a 5d 02	 mov	 bl, BYTE PTR [ebp+2]
  00ee5	3a 59 02	 cmp	 bl, BYTE PTR [ecx+2]
  00ee8	74 10		 je	 SHORT $LN39@Railgun_Qu@3
$LN62@Railgun_Qu@3:
  00eea	8b 4c 24 10	 mov	 ecx, DWORD PTR _AdvanceHopperGrass$[esp+1060]
$LN14@Railgun_Qu@3:

; 4998 : 			AdvanceHopperGrass = 0;
; 4999 : 			cbPattern -= 4;
; 5000 : 			while ((ulHashTarget = *(uint8_t const*)pbTarget++)) {

  00eee	0f b6 3e	 movzx	 edi, BYTE PTR [esi]
  00ef1	85 ff		 test	 edi, edi
  00ef3	75 9e		 jne	 SHORT $LL16@Railgun_Qu@3

; 5037 :          }
; 5038 :          if ( count <= 0) return(pbTarget+i);

  00ef5	e9 01 ff ff ff	 jmp	 $LN5@Railgun_Qu@3
$LN39@Railgun_Qu@3:

; 5003 : 				return pbTarget - 4;

  00efa	8d 46 fc	 lea	 eax, DWORD PTR [esi-4]

; 5004 : 			}
; 5005 : 			return  NULL;

  00efd	e9 fb fe ff ff	 jmp	 $LN69@Railgun_Qu@3
$LN17@Railgun_Qu@3:

; 5006 : 
; 5007 : 
; 5008 : } else { //if (cbTarget<961)
; 5009 :         //countSTATIC = cbPattern-2; //r.6+
; 5010 :         //countSTATIC = cbPattern-2-3;
; 5011 :         countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!

  00f02	8d 48 fc	 lea	 ecx, DWORD PTR [eax-4]
  00f05	89 4c 24 10	 mov	 DWORD PTR _countSTATIC$[esp+1060], ecx

; 5012 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 5013 : // Next line fixes the BUG from r.6++: but with awful speed degradation! So the bug is fixed in the definitions by setting 'countSTATIC = cbPattern-2-2;', bug appears only for patterns with lengths of 4, The setback is one unnecessary comparison for 5bytes patterns, stupidly such setback exists (from before) for 4bytes as well.
; 5014 : //if (countSTATIC<0) countSTATIC=0;
; 5015 :     /* Preprocessing */
; 5016 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  00f09	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  00f0e	8d 7c 24 20	 lea	 edi, DWORD PTR _bm_bc$[esp+1060]
  00f12	f3 ab		 rep stosd

; 5017 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  00f14	8d 78 ff	 lea	 edi, DWORD PTR [eax-1]
  00f17	33 c9		 xor	 ecx, ecx
  00f19	85 ff		 test	 edi, edi
  00f1b	74 14		 je	 SHORT $LN7@Railgun_Qu@3
  00f1d	8d 68 ff	 lea	 ebp, DWORD PTR [eax-1]
$LL9@Railgun_Qu@3:
  00f20	0f be 3c 0a	 movsx	 edi, BYTE PTR [edx+ecx]
  00f24	89 6c bc 20	 mov	 DWORD PTR _bm_bc$[esp+edi*4+1060], ebp
  00f28	41		 inc	 ecx
  00f29	8d 78 ff	 lea	 edi, DWORD PTR [eax-1]
  00f2c	4d		 dec	 ebp
  00f2d	3b cf		 cmp	 ecx, edi
  00f2f	72 ef		 jb	 SHORT $LL9@Railgun_Qu@3
$LN7@Railgun_Qu@3:

; 5018 : 
; 5019 :     /* Searching */
; 5020 :     //lastch=pbPattern[cbPattern-1];
; 5021 :     //firstch=pbPattern[0];
; 5022 :     i=0;

  00f31	33 c9		 xor	 ecx, ecx

; 5023 :     while (i <= cbTarget-cbPattern) {

  00f33	2b d8		 sub	 ebx, eax
  00f35	8d 7c 06 ff	 lea	 edi, DWORD PTR [esi+eax-1]
  00f39	0f be 44 02 ff	 movsx	 eax, BYTE PTR [edx+eax-1]
  00f3e	89 5c 24 1c	 mov	 DWORD PTR $T9733[esp+1060], ebx
  00f42	89 7c 24 18	 mov	 DWORD PTR tv563[esp+1060], edi
  00f46	89 44 24 14	 mov	 DWORD PTR tv360[esp+1060], eax
  00f4a	8d 9b 00 00 00
	00		 npad	 6
$LL6@Railgun_Qu@3:

; 5024 :        ch=pbTarget[i+cbPattern-1];
; 5025 :        //if (ch ==lastch)
; 5026 :           //if (memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) OUTPUT(i);
; 5027 :           //if (ch == lastch && pbTarget[i] == firstch && memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 5028 :           //if (ch == pbPattern[cbPattern-1] && pbTarget[i] == pbPattern[0]) // r.6+
; 5029 :           //if (ch == pbPattern[cbPattern-1] && *(long *)&pbTarget[i] == *(long *)&pbPattern[0]) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 5030 :           if (ch == pbPattern[cbPattern-1] && *(long *)&pbTarget[i] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.

  00f50	0f b6 04 0f	 movzx	 eax, BYTE PTR [edi+ecx]
  00f54	3b 44 24 14	 cmp	 eax, DWORD PTR tv360[esp+1060]
  00f58	75 2a		 jne	 SHORT $LN1@Railgun_Qu@3
  00f5a	8b 02		 mov	 eax, DWORD PTR [edx]
  00f5c	39 04 31	 cmp	 DWORD PTR [ecx+esi], eax
  00f5f	75 23		 jne	 SHORT $LN1@Railgun_Qu@3

; 5031 :              {
; 5032 :          count = countSTATIC;

  00f61	8b 44 24 10	 mov	 eax, DWORD PTR _countSTATIC$[esp+1060]

; 5033 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5034 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5035 :          while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  00f65	85 c0		 test	 eax, eax
  00f67	74 2e		 je	 SHORT $LN54@Railgun_Qu@3

; 5031 :              {
; 5032 :          count = countSTATIC;

  00f69	8d 6a 04	 lea	 ebp, DWORD PTR [edx+4]
  00f6c	8d 7c 31 04	 lea	 edi, DWORD PTR [ecx+esi+4]
$LL3@Railgun_Qu@3:

; 5033 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5034 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5035 :          while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  00f70	8a 5d 00	 mov	 bl, BYTE PTR [ebp]
  00f73	3a 1f		 cmp	 bl, BYTE PTR [edi]
  00f75	75 05		 jne	 SHORT $LN63@Railgun_Qu@3

; 5036 :                count--;

  00f77	47		 inc	 edi
  00f78	45		 inc	 ebp
  00f79	48		 dec	 eax
  00f7a	75 f4		 jne	 SHORT $LL3@Railgun_Qu@3
$LN63@Railgun_Qu@3:

; 5037 :          }
; 5038 :          if ( count <= 0) return(pbTarget+i);

  00f7c	85 c0		 test	 eax, eax
  00f7e	7e 17		 jle	 SHORT $LN54@Railgun_Qu@3
  00f80	8b 7c 24 18	 mov	 edi, DWORD PTR tv563[esp+1060]
$LN1@Railgun_Qu@3:

; 5039 : 	     }
; 5040 :        i+=bm_bc[ch];

  00f84	0f b6 04 0f	 movzx	 eax, BYTE PTR [edi+ecx]
  00f88	03 4c 84 20	 add	 ecx, DWORD PTR _bm_bc$[esp+eax*4+1060]
  00f8c	3b 4c 24 1c	 cmp	 ecx, DWORD PTR $T9733[esp+1060]
  00f90	76 be		 jbe	 SHORT $LL6@Railgun_Qu@3

; 5037 :          }
; 5038 :          if ( count <= 0) return(pbTarget+i);

  00f92	e9 64 fe ff ff	 jmp	 $LN5@Railgun_Qu@3
$LN54@Railgun_Qu@3:
  00f97	8d 04 31	 lea	 eax, DWORD PTR [ecx+esi]
  00f9a	e9 5e fe ff ff	 jmp	 $LN69@Railgun_Qu@3
_Railgun_Quadruplet_6ppMischa ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_6pp
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
$T9769 = -1060						; size = 4
_Quadruplet2nd$ = -1060					; size = 4
_AdvanceHopperGrass$ = -1056				; size = 4
tv595 = -1052						; size = 4
_Quadruplet3rd$ = -1052					; size = 4
_ulHashPattern$ = -1048					; size = 4
_countSTATIC$ = -1044					; size = 4
_Quadruplet4th$ = -1044					; size = 4
_pbPattern$GSCopy$ = -1040				; size = 4
tv392 = -1036						; size = 4
_pbTargetMax$ = -1036					; size = 4
tv566 = -1032						; size = 4
_bm_bc$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_6pp PROC

; 5056 : {

  00fa0	81 ec 24 04 00
	00		 sub	 esp, 1060		; 00000424H
  00fa6	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  00fab	33 c4		 xor	 eax, esp
  00fad	89 84 24 20 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1060], eax

; 5057 :     char * pbTargetMax = pbTarget + cbTarget;
; 5058 :     register unsigned long  ulHashPattern;
; 5059 :     unsigned long ulHashTarget;
; 5060 :     //unsigned long count; //r.6+
; 5061 :     signed long count;
; 5062 :     //unsigned long countSTATIC; //r.6+
; 5063 :     signed long countSTATIC;
; 5064 : //  unsigned long countRemainder;
; 5065 : 
; 5066 : /*
; 5067 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 5068 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 5069 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 5070 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 5071 : */
; 5072 :     unsigned char SINGLET;
; 5073 :     unsigned long Quadruplet2nd;
; 5074 :     unsigned long Quadruplet3rd;
; 5075 :     unsigned long Quadruplet4th;
; 5076 : 
; 5077 :     unsigned long  AdvanceHopperGrass;
; 5078 : 
; 5079 :     long i; //BMH needed
; 5080 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 5081 :     unsigned char ch; //BMH needed
; 5082 : //    unsigned char lastch, firstch; //BMH needed
; 5083 : 
; 5084 :     if (cbPattern > cbTarget)

  00fb4	8b 94 24 34 04
	00 00		 mov	 edx, DWORD PTR _cbPattern$[esp+1056]
  00fbb	53		 push	 ebx
  00fbc	8b 9c 24 30 04
	00 00		 mov	 ebx, DWORD PTR _pbPattern$[esp+1060]
  00fc3	55		 push	 ebp
  00fc4	8b ac 24 30 04
	00 00		 mov	 ebp, DWORD PTR _pbTarget$[esp+1064]
  00fcb	56		 push	 esi
  00fcc	8b b4 24 3c 04
	00 00		 mov	 esi, DWORD PTR _cbTarget$[esp+1068]
  00fd3	57		 push	 edi
  00fd4	8d 3c 2e	 lea	 edi, DWORD PTR [esi+ebp]
  00fd7	89 5c 24 24	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1076], ebx
  00fdb	89 7c 24 28	 mov	 DWORD PTR _pbTargetMax$[esp+1076], edi
  00fdf	3b d6		 cmp	 edx, esi

; 5085 :         return(NULL);

  00fe1	77 46		 ja	 SHORT $LN5@Railgun_Qu@4

; 5086 : 
; 5087 : // Doesn't work when cbPattern = 1
; 5088 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 5089 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  00fe3	83 fa 04	 cmp	 edx, 4
  00fe6	0f 83 97 00 00
	00		 jae	 $LN41@Railgun_Qu@4

; 5090 :         pbTarget = pbTarget+cbPattern;
; 5091 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  00fec	0f be 03	 movsx	 eax, BYTE PTR [ebx]
  00fef	0f be 4c 13 ff	 movsx	 ecx, BYTE PTR [ebx+edx-1]
  00ff4	c1 e0 08	 shl	 eax, 8
  00ff7	03 ea		 add	 ebp, edx
  00ff9	03 c8		 add	 ecx, eax

; 5092 : //        countSTATIC = cbPattern-2;
; 5093 : 
; 5094 : if ( cbPattern==3) {

  00ffb	83 fa 03	 cmp	 edx, 3
  00ffe	75 49		 jne	 SHORT $LN46@Railgun_Qu@4
$LL39@Railgun_Qu@4:

; 5095 :     for ( ;; )
; 5096 :     {
; 5097 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  01000	0f be 55 fd	 movsx	 edx, BYTE PTR [ebp-3]
  01004	0f be 45 ff	 movsx	 eax, BYTE PTR [ebp-1]
  01008	c1 e2 08	 shl	 edx, 8
  0100b	03 d0		 add	 edx, eax
  0100d	3b ca		 cmp	 ecx, edx
  0100f	75 08		 jne	 SHORT $LN36@Railgun_Qu@4

; 5098 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  01011	8a 53 01	 mov	 dl, BYTE PTR [ebx+1]
  01014	3a 55 fe	 cmp	 dl, BYTE PTR [ebp-2]
  01017	74 2b		 je	 SHORT $LN53@Railgun_Qu@4
$LN36@Railgun_Qu@4:

; 5099 :         }
; 5100 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  01019	8b c1		 mov	 eax, ecx
  0101b	c1 e8 08	 shr	 eax, 8
  0101e	3a 45 fe	 cmp	 al, BYTE PTR [ebp-2]
  01021	74 01		 je	 SHORT $LN35@Railgun_Qu@4
  01023	45		 inc	 ebp
$LN35@Railgun_Qu@4:

; 5101 :         pbTarget++;

  01024	45		 inc	 ebp

; 5102 :         if (pbTarget > pbTargetMax)

  01025	3b ef		 cmp	 ebp, edi
  01027	76 d7		 jbe	 SHORT $LL39@Railgun_Qu@4
$LN5@Railgun_Qu@4:

; 5246 :     }
; 5247 :     return(NULL);

  01029	33 c0		 xor	 eax, eax
$LN13@Railgun_Qu@4:

; 5248 : } //if (cbTarget<961)
; 5249 : } //if ( cbPattern<4)
; 5250 : }

  0102b	8b 8c 24 30 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1076]
  01032	5f		 pop	 edi
  01033	5e		 pop	 esi
  01034	5d		 pop	 ebp
  01035	5b		 pop	 ebx
  01036	33 cc		 xor	 ecx, esp
  01038	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0103d	81 c4 24 04 00
	00		 add	 esp, 1060		; 00000424H
  01043	c3		 ret	 0
$LN53@Railgun_Qu@4:

; 5098 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  01044	8d 45 fd	 lea	 eax, DWORD PTR [ebp-3]

; 5103 :             return(NULL);

  01047	eb e2		 jmp	 SHORT $LN13@Railgun_Qu@4
$LN46@Railgun_Qu@4:

; 5104 :     }
; 5105 : } else {
; 5106 : }
; 5107 :     for ( ;; )
; 5108 :     {
; 5109 :         // The line below gives for 'cbPattern'>=1:
; 5110 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 5111 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 5112 : /*
; 5113 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 5114 :             return((long)(pbTarget-cbPattern));
; 5115 : */
; 5116 : 
; 5117 :         // The fragment below gives for 'cbPattern'>=2:
; 5118 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 5119 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 5120 : 
; 5121 : /*
; 5122 : //For 2 and 3 [
; 5123 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 5124 : //         count = countSTATIC;
; 5125 :          count = cbPattern-2;
; 5126 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5127 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 5128 :                count--;
; 5129 :          }
; 5130 :          if ( count == 0) return((pbTarget-cbPattern));
; 5131 :         }
; 5132 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 5133 : //For 2 and 3 ]
; 5134 : */
; 5135 : 
; 5136 : 
; 5137 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  01049	8a 45 ff	 mov	 al, BYTE PTR [ebp-1]
  0104c	0f be 55 fe	 movsx	 edx, BYTE PTR [ebp-2]
  01050	0f be f0	 movsx	 esi, al
  01053	c1 e2 08	 shl	 edx, 8
  01056	03 d6		 add	 edx, esi
  01058	3b ca		 cmp	 ecx, edx
  0105a	74 22		 je	 SHORT $LN55@Railgun_Qu@4
  0105c	8b d1		 mov	 edx, ecx
  0105e	c1 ea 08	 shr	 edx, 8
$LL32@Railgun_Qu@4:

; 5139 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  01061	3a d0		 cmp	 dl, al
  01063	74 01		 je	 SHORT $LN71@Railgun_Qu@4
  01065	45		 inc	 ebp
$LN71@Railgun_Qu@4:

; 5140 : 
; 5141 : 
; 5142 :         // The fragment below gives for 'cbPattern'>=2:
; 5143 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 5144 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 5145 : /*
; 5146 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 5147 :          count = countSTATIC>>2;
; 5148 :          countRemainder = countSTATIC % 4;
; 5149 : 
; 5150 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 5151 :                count--;
; 5152 :          }
; 5153 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 5154 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 5155 :                countRemainder--;
; 5156 :          }
; 5157 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 5158 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 5159 :          //}
; 5160 :         }
; 5161 : */
; 5162 : 
; 5163 :         pbTarget++;

  01066	45		 inc	 ebp

; 5164 :         if (pbTarget > pbTargetMax)

  01067	3b ef		 cmp	 ebp, edi
  01069	77 be		 ja	 SHORT $LN5@Railgun_Qu@4

; 5104 :     }
; 5105 : } else {
; 5106 : }
; 5107 :     for ( ;; )
; 5108 :     {
; 5109 :         // The line below gives for 'cbPattern'>=1:
; 5110 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 5111 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 5112 : /*
; 5113 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 5114 :             return((long)(pbTarget-cbPattern));
; 5115 : */
; 5116 : 
; 5117 :         // The fragment below gives for 'cbPattern'>=2:
; 5118 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 5119 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 5120 : 
; 5121 : /*
; 5122 : //For 2 and 3 [
; 5123 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 5124 : //         count = countSTATIC;
; 5125 :          count = cbPattern-2;
; 5126 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5127 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 5128 :                count--;
; 5129 :          }
; 5130 :          if ( count == 0) return((pbTarget-cbPattern));
; 5131 :         }
; 5132 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 5133 : //For 2 and 3 ]
; 5134 : */
; 5135 : 
; 5136 : 
; 5137 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  0106b	8a 45 ff	 mov	 al, BYTE PTR [ebp-1]
  0106e	0f be 75 fe	 movsx	 esi, BYTE PTR [ebp-2]
  01072	0f be d8	 movsx	 ebx, al
  01075	c1 e6 08	 shl	 esi, 8
  01078	03 f3		 add	 esi, ebx
  0107a	3b ce		 cmp	 ecx, esi
  0107c	75 e3		 jne	 SHORT $LL32@Railgun_Qu@4
$LN55@Railgun_Qu@4:

; 5138 :             return((pbTarget-2));

  0107e	8d 45 fe	 lea	 eax, DWORD PTR [ebp-2]

; 5165 :             return(NULL);

  01081	eb a8		 jmp	 SHORT $LN13@Railgun_Qu@4
$LN41@Railgun_Qu@4:

; 5166 :     }
; 5167 : } else { //if ( cbPattern<4)
; 5168 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.
; 5169 : {
; 5170 :         pbTarget = pbTarget+cbPattern;
; 5171 :         ulHashPattern = *(unsigned long *)(pbPattern);

  01083	8b 0b		 mov	 ecx, DWORD PTR [ebx]
  01085	89 4c 24 1c	 mov	 DWORD PTR _ulHashPattern$[esp+1076], ecx
  01089	81 fe c1 03 00
	00		 cmp	 esi, 961		; 000003c1H
  0108f	0f 83 d3 00 00
	00		 jae	 $LN26@Railgun_Qu@4

; 5172 : //        countSTATIC = cbPattern-1;
; 5173 : 
; 5174 :     //SINGLET = *(char *)(pbPattern);
; 5175 :     SINGLET = ulHashPattern & 0xFF;
; 5176 :     Quadruplet2nd = SINGLET<<8;

  01095	0f b6 c1	 movzx	 eax, cl
  01098	8b f0		 mov	 esi, eax
  0109a	c1 e6 08	 shl	 esi, 8
  0109d	89 74 24 10	 mov	 DWORD PTR _Quadruplet2nd$[esp+1076], esi

; 5177 :     Quadruplet3rd = SINGLET<<16;

  010a1	8b f0		 mov	 esi, eax
  010a3	c1 e6 10	 shl	 esi, 16			; 00000010H
  010a6	03 ea		 add	 ebp, edx
  010a8	89 44 24 2c	 mov	 DWORD PTR tv566[esp+1076], eax

; 5178 :     Quadruplet4th = SINGLET<<24;

  010ac	c1 e0 18	 shl	 eax, 24			; 00000018H
  010af	89 74 24 18	 mov	 DWORD PTR _Quadruplet3rd$[esp+1076], esi
  010b3	89 44 24 20	 mov	 DWORD PTR _Quadruplet4th$[esp+1076], eax
$LL25@Railgun_Qu@4:

; 5179 : 
; 5180 :     for ( ;; )
; 5181 :     {
; 5182 : 	AdvanceHopperGrass = 0;
; 5183 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  010b7	8b c5		 mov	 eax, ebp
  010b9	2b c2		 sub	 eax, edx
  010bb	8b 00		 mov	 eax, DWORD PTR [eax]
  010bd	33 db		 xor	 ebx, ebx
  010bf	89 5c 24 14	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1076], ebx

; 5184 : 
; 5185 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  010c3	3b c8		 cmp	 ecx, eax
  010c5	75 54		 jne	 SHORT $LN23@Railgun_Qu@4

; 5186 : //         count = countSTATIC;
; 5187 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5188 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 5189 : //               count--;
; 5190 : //         }
; 5191 :          count = cbPattern-1;

  010c7	8d 42 ff	 lea	 eax, DWORD PTR [edx-1]

; 5192 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  010ca	85 c0		 test	 eax, eax
  010cc	74 3e		 je	 SHORT $LN65@Railgun_Qu@4

; 5186 : //         count = countSTATIC;
; 5187 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5188 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 5189 : //               count--;
; 5190 : //         }
; 5191 :          count = cbPattern-1;

  010ce	8b 74 24 24	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  010d2	8b fd		 mov	 edi, ebp
  010d4	2b f0		 sub	 esi, eax
  010d6	2b f8		 sub	 edi, eax
  010d8	03 f2		 add	 esi, edx
  010da	8d 9b 00 00 00
	00		 npad	 6
$LL22@Railgun_Qu@4:

; 5192 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  010e0	8a 0f		 mov	 cl, BYTE PTR [edi]
  010e2	38 0e		 cmp	 BYTE PTR [esi], cl
  010e4	75 2f		 jne	 SHORT $LN21@Railgun_Qu@4

; 5193 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  010e6	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  010e9	03 d8		 add	 ebx, eax
  010eb	3b cb		 cmp	 ecx, ebx
  010ed	75 14		 jne	 SHORT $LN66@Railgun_Qu@4
  010ef	0f be 0f	 movsx	 ecx, BYTE PTR [edi]
  010f2	39 4c 24 2c	 cmp	 DWORD PTR tv566[esp+1076], ecx
  010f6	74 0b		 je	 SHORT $LN66@Railgun_Qu@4
  010f8	8b 5c 24 14	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+1076]
  010fc	43		 inc	 ebx
  010fd	89 5c 24 14	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1076], ebx
  01101	eb 04		 jmp	 SHORT $LN20@Railgun_Qu@4
$LN66@Railgun_Qu@4:
  01103	8b 5c 24 14	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+1076]
$LN20@Railgun_Qu@4:

; 5194 :                count--;

  01107	46		 inc	 esi
  01108	47		 inc	 edi
  01109	48		 dec	 eax
  0110a	75 d4		 jne	 SHORT $LL22@Railgun_Qu@4
$LN65@Railgun_Qu@4:

; 5195 :          }
; 5196 :          if ( count == 0) return((pbTarget-cbPattern));

  0110c	8b c5		 mov	 eax, ebp
  0110e	2b c2		 sub	 eax, edx

; 5211 :             return(NULL);

  01110	e9 16 ff ff ff	 jmp	 $LN13@Railgun_Qu@4
$LN21@Railgun_Qu@4:

; 5195 :          }
; 5196 :          if ( count == 0) return((pbTarget-cbPattern));

  01115	85 c0		 test	 eax, eax
  01117	74 f3		 je	 SHORT $LN65@Railgun_Qu@4

; 5197 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  01119	eb 36		 jmp	 SHORT $LN15@Railgun_Qu@4
$LN23@Railgun_Qu@4:

; 5198 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  0111b	8b c8		 mov	 ecx, eax
  0111d	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  01123	39 4c 24 10	 cmp	 DWORD PTR _Quadruplet2nd$[esp+1076], ecx
  01127	74 28		 je	 SHORT $LN15@Railgun_Qu@4

; 5199 :          AdvanceHopperGrass++;
; 5200 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  01129	8b c8		 mov	 ecx, eax
  0112b	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  01131	bb 01 00 00 00	 mov	 ebx, 1
  01136	39 4c 24 18	 cmp	 DWORD PTR _Quadruplet3rd$[esp+1076], ecx
  0113a	74 15		 je	 SHORT $LN15@Railgun_Qu@4

; 5201 :               AdvanceHopperGrass++;
; 5202 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  0113c	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  01141	bb 02 00 00 00	 mov	 ebx, 2
  01146	39 44 24 20	 cmp	 DWORD PTR _Quadruplet4th$[esp+1076], eax
  0114a	74 05		 je	 SHORT $LN15@Railgun_Qu@4
  0114c	bb 03 00 00 00	 mov	 ebx, 3
$LN15@Railgun_Qu@4:

; 5203 :          }
; 5204 :     }
; 5205 : 	}
; 5206 : 
; 5207 : 	AdvanceHopperGrass++;
; 5208 : 
; 5209 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  01151	8d 6c 2b 01	 lea	 ebp, DWORD PTR [ebx+ebp+1]

; 5210 :         if (pbTarget > pbTargetMax)

  01155	3b 6c 24 28	 cmp	 ebp, DWORD PTR _pbTargetMax$[esp+1076]
  01159	0f 87 ca fe ff
	ff		 ja	 $LN5@Railgun_Qu@4

; 5212 :     }

  0115f	8b 4c 24 1c	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+1076]
  01163	e9 4f ff ff ff	 jmp	 $LL25@Railgun_Qu@4
$LN26@Railgun_Qu@4:

; 5213 : } else { //if (cbTarget<961)
; 5214 :         //countSTATIC = cbPattern-2; //r.6+
; 5215 :         //countSTATIC = cbPattern-2-3;
; 5216 :         countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!

  01168	8d 42 fc	 lea	 eax, DWORD PTR [edx-4]
  0116b	89 44 24 20	 mov	 DWORD PTR _countSTATIC$[esp+1076], eax

; 5217 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 5218 : // Next line fixes the BUG from r.6++: but with awful speed degradation! So the bug is fixed in the definitions by setting 'countSTATIC = cbPattern-2-2;', bug appears only for patterns with lengths of 4, The setback is one unnecessary comparison for 5bytes patterns, stupidly such setback exists (from before) for 4bytes as well.
; 5219 : //if (countSTATIC<0) countSTATIC=0;
; 5220 :     /* Preprocessing */
; 5221 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  0116f	8b c2		 mov	 eax, edx
  01171	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  01176	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc$[esp+1076]
  0117a	f3 ab		 rep stosd

; 5222 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  0117c	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  0117f	33 c0		 xor	 eax, eax
  01181	85 c9		 test	 ecx, ecx
  01183	74 1d		 je	 SHORT $LN7@Railgun_Qu@4
  01185	8d 7a ff	 lea	 edi, DWORD PTR [edx-1]
  01188	eb 06 8d 9b 00
	00 00 00	 npad	 8
$LL67@Railgun_Qu@4:
  01190	0f be 1c 03	 movsx	 ebx, BYTE PTR [ebx+eax]
  01194	89 7c 9c 30	 mov	 DWORD PTR _bm_bc$[esp+ebx*4+1076], edi
  01198	8b 5c 24 24	 mov	 ebx, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  0119c	40		 inc	 eax
  0119d	4f		 dec	 edi
  0119e	3b c1		 cmp	 eax, ecx
  011a0	72 ee		 jb	 SHORT $LL67@Railgun_Qu@4
$LN7@Railgun_Qu@4:

; 5223 : 
; 5224 :     /* Searching */
; 5225 :     //lastch=pbPattern[cbPattern-1];
; 5226 :     //firstch=pbPattern[0];
; 5227 :     i=0;

  011a2	33 ff		 xor	 edi, edi

; 5228 :     while (i <= cbTarget-cbPattern) {

  011a4	2b f2		 sub	 esi, edx
  011a6	8d 4c 2a ff	 lea	 ecx, DWORD PTR [edx+ebp-1]
  011aa	0f be 54 13 ff	 movsx	 edx, BYTE PTR [ebx+edx-1]
  011af	89 74 24 10	 mov	 DWORD PTR $T9769[esp+1076], esi
  011b3	89 4c 24 18	 mov	 DWORD PTR tv595[esp+1076], ecx
  011b7	89 54 24 28	 mov	 DWORD PTR tv392[esp+1076], edx
  011bb	eb 03 8d 49 00	 npad	 5
$LL6@Railgun_Qu@4:

; 5229 :        ch=pbTarget[i+cbPattern-1];
; 5230 :        //if (ch ==lastch)
; 5231 :           //if (memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) OUTPUT(i);
; 5232 :           //if (ch == lastch && pbTarget[i] == firstch && memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 5233 :           //if (ch == pbPattern[cbPattern-1] && pbTarget[i] == pbPattern[0]) // r.6+
; 5234 :           //if (ch == pbPattern[cbPattern-1] && *(long *)&pbTarget[i] == *(long *)&pbPattern[0]) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 5235 :           if (ch == pbPattern[cbPattern-1] && *(long *)&pbTarget[i] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.

  011c0	0f b6 04 39	 movzx	 eax, BYTE PTR [ecx+edi]
  011c4	3b 44 24 28	 cmp	 eax, DWORD PTR tv392[esp+1076]
  011c8	75 2b		 jne	 SHORT $LN1@Railgun_Qu@4
  011ca	8b 44 24 1c	 mov	 eax, DWORD PTR _ulHashPattern$[esp+1076]
  011ce	39 04 2f	 cmp	 DWORD PTR [edi+ebp], eax
  011d1	75 22		 jne	 SHORT $LN1@Railgun_Qu@4

; 5236 :              {
; 5237 :          count = countSTATIC;

  011d3	8b 44 24 20	 mov	 eax, DWORD PTR _countSTATIC$[esp+1076]

; 5238 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5239 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5240 :          while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  011d7	85 c0		 test	 eax, eax
  011d9	74 2d		 je	 SHORT $LN59@Railgun_Qu@4

; 5236 :              {
; 5237 :          count = countSTATIC;

  011db	8d 73 04	 lea	 esi, DWORD PTR [ebx+4]
  011de	8d 4c 2f 04	 lea	 ecx, DWORD PTR [edi+ebp+4]
$LL3@Railgun_Qu@4:

; 5238 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5239 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5240 :          while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  011e2	8a 16		 mov	 dl, BYTE PTR [esi]
  011e4	3a 11		 cmp	 dl, BYTE PTR [ecx]
  011e6	75 05		 jne	 SHORT $LN68@Railgun_Qu@4

; 5241 :                count--;

  011e8	41		 inc	 ecx
  011e9	46		 inc	 esi
  011ea	48		 dec	 eax
  011eb	75 f5		 jne	 SHORT $LL3@Railgun_Qu@4
$LN68@Railgun_Qu@4:

; 5238 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5239 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5240 :          while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  011ed	8b 4c 24 18	 mov	 ecx, DWORD PTR tv595[esp+1076]

; 5242 :          }
; 5243 :          if ( count <= 0) return(pbTarget+i);

  011f1	85 c0		 test	 eax, eax
  011f3	7e 13		 jle	 SHORT $LN59@Railgun_Qu@4
$LN1@Railgun_Qu@4:

; 5244 : 	     }
; 5245 :        i+=bm_bc[ch];

  011f5	0f b6 04 39	 movzx	 eax, BYTE PTR [ecx+edi]
  011f9	03 7c 84 30	 add	 edi, DWORD PTR _bm_bc$[esp+eax*4+1076]
  011fd	3b 7c 24 10	 cmp	 edi, DWORD PTR $T9769[esp+1076]
  01201	76 bd		 jbe	 SHORT $LL6@Railgun_Qu@4

; 5242 :          }
; 5243 :          if ( count <= 0) return(pbTarget+i);

  01203	e9 21 fe ff ff	 jmp	 $LN5@Railgun_Qu@4
$LN59@Railgun_Qu@4:
  01208	8d 04 2f	 lea	 eax, DWORD PTR [edi+ebp]
  0120b	e9 1b fe ff ff	 jmp	 $LN13@Railgun_Qu@4
_Railgun_Quadruplet_6pp ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_6pp_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
tv660 = -1061						; size = 1
_pbPattern$GSCopy$ = -1060				; size = 4
_AdvanceHopperGrass$ = -1056				; size = 4
tv457 = -1052						; size = 4
_pbTargetMax$ = -1052					; size = 4
_ulHashPattern$ = -1048					; size = 4
$T9799 = -1044						; size = 4
_Quadruplet3rd$ = -1044					; size = 4
_Quadruplet4th$ = -1040					; size = 4
tv537 = -1036						; size = 4
_Quadruplet2nd$ = -1032					; size = 4
_bm_bc$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_6pp_count_hits PROC

; 5260 : {

  01210	81 ec 28 04 00
	00		 sub	 esp, 1064		; 00000428H
  01216	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  0121b	33 c4		 xor	 eax, esp
  0121d	89 84 24 24 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1064], eax

; 5261 :     char * pbTargetMax = pbTarget + cbTarget;

  01224	8b 94 24 34 04
	00 00		 mov	 edx, DWORD PTR _cbTarget$[esp+1060]
  0122b	53		 push	 ebx
  0122c	8b 9c 24 30 04
	00 00		 mov	 ebx, DWORD PTR _pbTarget$[esp+1064]
  01233	55		 push	 ebp

; 5262 :     register unsigned long  ulHashPattern;
; 5263 :     unsigned long ulHashTarget;
; 5264 :     //unsigned long count; //r.6+
; 5265 :     signed long count;
; 5266 :     //unsigned long countSTATIC; //r.6+
; 5267 :     signed long countSTATIC;
; 5268 : //  unsigned long countRemainder;
; 5269 : 
; 5270 : /*
; 5271 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 5272 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 5273 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 5274 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 5275 : */
; 5276 :     unsigned char SINGLET;
; 5277 :     unsigned long Quadruplet2nd;
; 5278 :     unsigned long Quadruplet3rd;
; 5279 :     unsigned long Quadruplet4th;
; 5280 : 
; 5281 :     unsigned long  AdvanceHopperGrass;
; 5282 : 
; 5283 :     long i; //BMH needed
; 5284 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 5285 :     unsigned char ch; //BMH needed
; 5286 : //    unsigned char lastch, firstch; //BMH needed
; 5287 : 
; 5288 :     if (cbPattern > cbTarget)

  01234	8b ac 24 40 04
	00 00		 mov	 ebp, DWORD PTR _cbPattern$[esp+1068]
  0123b	56		 push	 esi
  0123c	8b b4 24 3c 04
	00 00		 mov	 esi, DWORD PTR _pbPattern$[esp+1072]
  01243	57		 push	 edi
  01244	8d 3c 13	 lea	 edi, DWORD PTR [ebx+edx]
  01247	89 74 24 14	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1080], esi
  0124b	89 7c 24 1c	 mov	 DWORD PTR _pbTargetMax$[esp+1080], edi
  0124f	3b ea		 cmp	 ebp, edx

; 5289 :         return(NULL);

  01251	0f 87 10 02 00
	00		 ja	 $LN84@Railgun_Qu@5

; 5290 : 
; 5291 : // Doesn't work when cbPattern = 1
; 5292 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 5293 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  01257	83 fd 04	 cmp	 ebp, 4
  0125a	73 7d		 jae	 SHORT $LN41@Railgun_Qu@5

; 5294 :         pbTarget = pbTarget+cbPattern;
; 5295 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  0125c	0f be 0e	 movsx	 ecx, BYTE PTR [esi]
  0125f	0f be 44 2e ff	 movsx	 eax, BYTE PTR [esi+ebp-1]
  01264	c1 e1 08	 shl	 ecx, 8
  01267	03 c1		 add	 eax, ecx

; 5296 : //        countSTATIC = cbPattern-2;
; 5297 : 
; 5298 : if ( cbPattern==3) {

  01269	8b c8		 mov	 ecx, eax
  0126b	03 dd		 add	 ebx, ebp
  0126d	c1 e9 08	 shr	 ecx, 8
  01270	83 fd 03	 cmp	 ebp, 3
  01273	75 2f		 jne	 SHORT $LN69@Railgun_Qu@5
$LL39@Railgun_Qu@5:

; 5299 :     for ( ;; )
; 5300 :     {
; 5301 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  01275	0f be 53 fd	 movsx	 edx, BYTE PTR [ebx-3]
  01279	0f be 6b ff	 movsx	 ebp, BYTE PTR [ebx-1]
  0127d	c1 e2 08	 shl	 edx, 8
  01280	03 d5		 add	 edx, ebp
  01282	3b c2		 cmp	 eax, edx
  01284	75 0e		 jne	 SHORT $LN80@Railgun_Qu@5

; 5302 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));

  01286	8a 56 01	 mov	 dl, BYTE PTR [esi+1]
  01289	3a 53 fe	 cmp	 dl, BYTE PTR [ebx-2]
  0128c	75 06		 jne	 SHORT $LN80@Railgun_Qu@5
  0128e	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN80@Railgun_Qu@5:

; 5303 :         }
; 5304 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  01294	3a 4b fe	 cmp	 cl, BYTE PTR [ebx-2]
  01297	74 01		 je	 SHORT $LN83@Railgun_Qu@5
  01299	43		 inc	 ebx
$LN83@Railgun_Qu@5:

; 5305 :         pbTarget++;

  0129a	43		 inc	 ebx

; 5306 :         if (pbTarget > pbTargetMax)

  0129b	3b df		 cmp	 ebx, edi
  0129d	76 d6		 jbe	 SHORT $LL39@Railgun_Qu@5

; 5307 :             return(NULL);

  0129f	e9 c3 01 00 00	 jmp	 $LN84@Railgun_Qu@5
$LN69@Railgun_Qu@5:
  012a4	ba 01 00 00 00	 mov	 edx, 1
  012a9	8d a4 24 00 00
	00 00		 npad	 7
$LL32@Railgun_Qu@5:

; 5308 :     }
; 5309 : } else {
; 5310 : }
; 5311 :     for ( ;; )
; 5312 :     {
; 5313 :         // The line below gives for 'cbPattern'>=1:
; 5314 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 5315 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 5316 : /*
; 5317 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 5318 :             return((long)(pbTarget-cbPattern));
; 5319 : */
; 5320 : 
; 5321 :         // The fragment below gives for 'cbPattern'>=2:
; 5322 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 5323 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 5324 : 
; 5325 : /*
; 5326 : //For 2 and 3 [
; 5327 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 5328 : //         count = countSTATIC;
; 5329 :          count = cbPattern-2;
; 5330 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5331 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 5332 :                count--;
; 5333 :          }
; 5334 :          if ( count == 0) return((pbTarget-cbPattern));
; 5335 :         }
; 5336 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 5337 : //For 2 and 3 ]
; 5338 : */
; 5339 : 
; 5340 : 
; 5341 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  012b0	0f be 73 fe	 movsx	 esi, BYTE PTR [ebx-2]
  012b4	0f be 6b ff	 movsx	 ebp, BYTE PTR [ebx-1]
  012b8	c1 e6 08	 shl	 esi, 8
  012bb	03 f5		 add	 esi, ebp
  012bd	3b c6		 cmp	 eax, esi
  012bf	75 06		 jne	 SHORT $LN30@Railgun_Qu@5

; 5342 :             Railgunhits++; //return((pbTarget-2));

  012c1	01 15 00 00 00
	00		 add	 DWORD PTR _Railgunhits, edx
$LN30@Railgun_Qu@5:

; 5343 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  012c7	3a 4b ff	 cmp	 cl, BYTE PTR [ebx-1]
  012ca	74 02		 je	 SHORT $LN29@Railgun_Qu@5
  012cc	03 da		 add	 ebx, edx
$LN29@Railgun_Qu@5:

; 5344 : 
; 5345 : 
; 5346 :         // The fragment below gives for 'cbPattern'>=2:
; 5347 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 5348 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 5349 : /*
; 5350 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 5351 :          count = countSTATIC>>2;
; 5352 :          countRemainder = countSTATIC % 4;
; 5353 : 
; 5354 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 5355 :                count--;
; 5356 :          }
; 5357 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 5358 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 5359 :                countRemainder--;
; 5360 :          }
; 5361 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 5362 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 5363 :          //}
; 5364 :         }
; 5365 : */
; 5366 : 
; 5367 :         pbTarget++;

  012ce	03 da		 add	 ebx, edx

; 5368 :         if (pbTarget > pbTargetMax)

  012d0	3b df		 cmp	 ebx, edi
  012d2	76 dc		 jbe	 SHORT $LL32@Railgun_Qu@5

; 5369 :             return(NULL);

  012d4	e9 8e 01 00 00	 jmp	 $LN84@Railgun_Qu@5
$LN41@Railgun_Qu@5:

; 5370 :     }
; 5371 : } else { //if ( cbPattern<4)
; 5372 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  012d9	81 fa c1 03 00
	00		 cmp	 edx, 961		; 000003c1H
  012df	0f 83 e7 00 00
	00		 jae	 $LN26@Railgun_Qu@5

; 5373 : {
; 5374 :         pbTarget = pbTarget+cbPattern;
; 5375 :         ulHashPattern = *(unsigned long *)(pbPattern);

  012e5	8b 16		 mov	 edx, DWORD PTR [esi]

; 5376 : //        countSTATIC = cbPattern-1;
; 5377 : 
; 5378 :     //SINGLET = *(char *)(pbPattern);
; 5379 :     SINGLET = ulHashPattern & 0xFF;
; 5380 :     Quadruplet2nd = SINGLET<<8;

  012e7	0f b6 c2	 movzx	 eax, dl
  012ea	8b f0		 mov	 esi, eax

; 5381 :     Quadruplet3rd = SINGLET<<16;

  012ec	8b c8		 mov	 ecx, eax
  012ee	c1 e6 08	 shl	 esi, 8
  012f1	c1 e1 10	 shl	 ecx, 16			; 00000010H
  012f4	03 dd		 add	 ebx, ebp
  012f6	89 44 24 2c	 mov	 DWORD PTR tv537[esp+1080], eax

; 5382 :     Quadruplet4th = SINGLET<<24;

  012fa	c1 e0 18	 shl	 eax, 24			; 00000018H
  012fd	89 54 24 20	 mov	 DWORD PTR _ulHashPattern$[esp+1080], edx
  01301	89 74 24 30	 mov	 DWORD PTR _Quadruplet2nd$[esp+1080], esi
  01305	89 4c 24 24	 mov	 DWORD PTR _Quadruplet3rd$[esp+1080], ecx
  01309	89 44 24 28	 mov	 DWORD PTR _Quadruplet4th$[esp+1080], eax
  0130d	eb 0d		 jmp	 SHORT $LN25@Railgun_Qu@5
  0130f	90		 npad	 1
$LL81@Railgun_Qu@5:
  01310	8b 44 24 28	 mov	 eax, DWORD PTR _Quadruplet4th$[esp+1080]
  01314	8b 54 24 20	 mov	 edx, DWORD PTR _ulHashPattern$[esp+1080]
  01318	8b 74 24 30	 mov	 esi, DWORD PTR _Quadruplet2nd$[esp+1080]
$LN25@Railgun_Qu@5:

; 5383 : 
; 5384 :     for ( ;; )
; 5385 :     {
; 5386 : 	AdvanceHopperGrass = 0;
; 5387 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  0131c	8b cb		 mov	 ecx, ebx
  0131e	2b cd		 sub	 ecx, ebp
  01320	8b 09		 mov	 ecx, DWORD PTR [ecx]
  01322	33 ff		 xor	 edi, edi
  01324	89 7c 24 18	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], edi

; 5388 : 
; 5389 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  01328	3b d1		 cmp	 edx, ecx
  0132a	75 5a		 jne	 SHORT $LN23@Railgun_Qu@5

; 5390 : //         count = countSTATIC;
; 5391 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5392 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 5393 : //               count--;
; 5394 : //         }
; 5395 :          count = cbPattern-1;

  0132c	8d 4d ff	 lea	 ecx, DWORD PTR [ebp-1]

; 5396 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  0132f	85 c9		 test	 ecx, ecx
  01331	74 4b		 je	 SHORT $LN61@Railgun_Qu@5

; 5390 : //         count = countSTATIC;
; 5391 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5392 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 5393 : //               count--;
; 5394 : //         }
; 5395 :          count = cbPattern-1;

  01333	8b 54 24 14	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+1080]
  01337	8b f3		 mov	 esi, ebx
  01339	2b d1		 sub	 edx, ecx
  0133b	2b f1		 sub	 esi, ecx
  0133d	03 d5		 add	 edx, ebp
  0133f	90		 npad	 1
$LL22@Railgun_Qu@5:

; 5396 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  01340	8a 06		 mov	 al, BYTE PTR [esi]
  01342	88 44 24 13	 mov	 BYTE PTR tv660[esp+1080], al
  01346	38 02		 cmp	 BYTE PTR [edx], al
  01348	75 30		 jne	 SHORT $LN21@Railgun_Qu@5

; 5397 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  0134a	8d 45 ff	 lea	 eax, DWORD PTR [ebp-1]
  0134d	03 f9		 add	 edi, ecx
  0134f	3b c7		 cmp	 eax, edi
  01351	75 16		 jne	 SHORT $LN77@Railgun_Qu@5
  01353	0f be 44 24 13	 movsx	 eax, BYTE PTR tv660[esp+1080]
  01358	39 44 24 2c	 cmp	 DWORD PTR tv537[esp+1080], eax
  0135c	74 0b		 je	 SHORT $LN77@Railgun_Qu@5
  0135e	8b 7c 24 18	 mov	 edi, DWORD PTR _AdvanceHopperGrass$[esp+1080]
  01362	47		 inc	 edi
  01363	89 7c 24 18	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], edi
  01367	eb 04		 jmp	 SHORT $LN20@Railgun_Qu@5
$LN77@Railgun_Qu@5:
  01369	8b 7c 24 18	 mov	 edi, DWORD PTR _AdvanceHopperGrass$[esp+1080]
$LN20@Railgun_Qu@5:

; 5398 :                count--;

  0136d	42		 inc	 edx
  0136e	46		 inc	 esi
  0136f	49		 dec	 ecx
  01370	75 ce		 jne	 SHORT $LL22@Railgun_Qu@5

; 5399 :          }
; 5400 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  01372	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 5401 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  01378	eb 3f		 jmp	 SHORT $LN78@Railgun_Qu@5
$LN21@Railgun_Qu@5:

; 5399 :          }
; 5400 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  0137a	85 c9		 test	 ecx, ecx
  0137c	75 3b		 jne	 SHORT $LN78@Railgun_Qu@5
$LN61@Railgun_Qu@5:
  0137e	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 5401 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  01384	eb 33		 jmp	 SHORT $LN78@Railgun_Qu@5
$LN23@Railgun_Qu@5:

; 5402 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  01386	8b d1		 mov	 edx, ecx
  01388	81 e2 00 ff 00
	00		 and	 edx, 65280		; 0000ff00H
  0138e	3b f2		 cmp	 esi, edx
  01390	74 27		 je	 SHORT $LN78@Railgun_Qu@5

; 5403 :          AdvanceHopperGrass++;
; 5404 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  01392	8b d1		 mov	 edx, ecx
  01394	81 e2 00 00 ff
	00		 and	 edx, 16711680		; 00ff0000H
  0139a	bf 01 00 00 00	 mov	 edi, 1
  0139f	39 54 24 24	 cmp	 DWORD PTR _Quadruplet3rd$[esp+1080], edx
  013a3	74 14		 je	 SHORT $LN78@Railgun_Qu@5

; 5405 :               AdvanceHopperGrass++;
; 5406 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  013a5	81 e1 00 00 00
	ff		 and	 ecx, -16777216		; ff000000H
  013ab	bf 02 00 00 00	 mov	 edi, 2
  013b0	3b c1		 cmp	 eax, ecx
  013b2	74 05		 je	 SHORT $LN78@Railgun_Qu@5
  013b4	bf 03 00 00 00	 mov	 edi, 3
$LN78@Railgun_Qu@5:

; 5407 :          }
; 5408 :     }
; 5409 : 	}
; 5410 : 
; 5411 : 	AdvanceHopperGrass++;
; 5412 : 
; 5413 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  013b9	8d 5c 3b 01	 lea	 ebx, DWORD PTR [ebx+edi+1]

; 5414 :         if (pbTarget > pbTargetMax)

  013bd	3b 5c 24 1c	 cmp	 ebx, DWORD PTR _pbTargetMax$[esp+1080]
  013c1	0f 86 49 ff ff
	ff		 jbe	 $LL81@Railgun_Qu@5

; 5415 :             return(NULL);

  013c7	e9 9b 00 00 00	 jmp	 $LN84@Railgun_Qu@5
$LN26@Railgun_Qu@5:

; 5416 :     }
; 5417 : } else { //if (cbTarget<961)
; 5418 :         //countSTATIC = cbPattern-2; //r.6+
; 5419 :         //countSTATIC = cbPattern-2-3;
; 5420 :         countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!
; 5421 :         ulHashPattern = *(unsigned long *)(pbPattern);

  013cc	8b 06		 mov	 eax, DWORD PTR [esi]
  013ce	89 44 24 20	 mov	 DWORD PTR _ulHashPattern$[esp+1080], eax

; 5422 : // Next line fixes the BUG from r.6++: but with awful speed degradation! So the bug is fixed in the definitions by setting 'countSTATIC = cbPattern-2-2;', bug appears only for patterns with lengths of 4, The setback is one unnecessary comparison for 5bytes patterns, stupidly such setback exists (from before) for 4bytes as well.
; 5423 : //if (countSTATIC<0) countSTATIC=0;
; 5424 :     /* Preprocessing */
; 5425 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  013d2	8b c5		 mov	 eax, ebp
  013d4	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  013d9	8d 7c 24 34	 lea	 edi, DWORD PTR _bm_bc$[esp+1080]
  013dd	f3 ab		 rep stosd

; 5426 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  013df	8d 45 ff	 lea	 eax, DWORD PTR [ebp-1]
  013e2	33 c9		 xor	 ecx, ecx
  013e4	85 c0		 test	 eax, eax
  013e6	74 1e		 je	 SHORT $LN7@Railgun_Qu@5
  013e8	8d 75 ff	 lea	 esi, DWORD PTR [ebp-1]
  013eb	eb 03 8d 49 00	 npad	 5
$LL9@Railgun_Qu@5:
  013f0	8b 7c 24 14	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+1080]
  013f4	0f be 3c 0f	 movsx	 edi, BYTE PTR [edi+ecx]
  013f8	89 74 bc 34	 mov	 DWORD PTR _bm_bc$[esp+edi*4+1080], esi
  013fc	41		 inc	 ecx
  013fd	4e		 dec	 esi
  013fe	3b c8		 cmp	 ecx, eax
  01400	72 ee		 jb	 SHORT $LL9@Railgun_Qu@5
  01402	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1080]
$LN7@Railgun_Qu@5:

; 5427 : 
; 5428 :     /* Searching */
; 5429 :     //lastch=pbPattern[cbPattern-1];
; 5430 :     //firstch=pbPattern[0];
; 5431 :     i=0;

  01406	33 ff		 xor	 edi, edi

; 5432 :     while (i <= cbTarget-cbPattern) {

  01408	2b d5		 sub	 edx, ebp
  0140a	89 54 24 24	 mov	 DWORD PTR $T9799[esp+1080], edx
  0140e	8b ff		 npad	 2
$LL6@Railgun_Qu@5:

; 5433 :        ch=pbTarget[i+cbPattern-1];
; 5434 :        //if (ch ==lastch)
; 5435 :           //if (memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) OUTPUT(i);
; 5436 :           //if (ch == lastch && pbTarget[i] == firstch && memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 5437 :           //if (ch == pbPattern[cbPattern-1] && pbTarget[i] == pbPattern[0]) // r.6+
; 5438 :           //if (ch == pbPattern[cbPattern-1] && *(long *)&pbTarget[i] == *(long *)&pbPattern[0]) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 5439 :           if (ch == pbPattern[cbPattern-1] && *(long *)&pbTarget[i] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.

  01410	0f be 4c 2e ff	 movsx	 ecx, BYTE PTR [esi+ebp-1]
  01415	8d 44 2b ff	 lea	 eax, DWORD PTR [ebx+ebp-1]
  01419	0f b6 04 38	 movzx	 eax, BYTE PTR [eax+edi]
  0141d	89 44 24 1c	 mov	 DWORD PTR tv457[esp+1080], eax
  01421	3b c1		 cmp	 eax, ecx
  01423	75 38		 jne	 SHORT $LN82@Railgun_Qu@5
  01425	8b 54 24 20	 mov	 edx, DWORD PTR _ulHashPattern$[esp+1080]
  01429	39 14 1f	 cmp	 DWORD PTR [edi+ebx], edx
  0142c	75 2f		 jne	 SHORT $LN82@Railgun_Qu@5

; 5440 :              {
; 5441 :          count = countSTATIC;

  0142e	8d 4d fc	 lea	 ecx, DWORD PTR [ebp-4]

; 5442 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5443 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5444 :          while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  01431	85 c9		 test	 ecx, ecx
  01433	74 22		 je	 SHORT $LN86@Railgun_Qu@5

; 5440 :              {
; 5441 :          count = countSTATIC;

  01435	83 c6 04	 add	 esi, 4
  01438	8d 54 1f 04	 lea	 edx, DWORD PTR [edi+ebx+4]
  0143c	8d 64 24 00	 npad	 4
$LL3@Railgun_Qu@5:

; 5442 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5443 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5444 :          while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  01440	8a 06		 mov	 al, BYTE PTR [esi]
  01442	3a 02		 cmp	 al, BYTE PTR [edx]
  01444	75 05		 jne	 SHORT $LN79@Railgun_Qu@5

; 5445 :                count--;

  01446	42		 inc	 edx
  01447	46		 inc	 esi
  01448	49		 dec	 ecx
  01449	75 f5		 jne	 SHORT $LL3@Railgun_Qu@5
$LN79@Railgun_Qu@5:

; 5442 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5443 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5444 :          while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  0144b	8b 44 24 1c	 mov	 eax, DWORD PTR tv457[esp+1080]
  0144f	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1080]

; 5446 :          }
; 5447 :          if ( count <= 0) Railgunhits++; //return(pbTarget+i);

  01453	85 c9		 test	 ecx, ecx
  01455	7f 06		 jg	 SHORT $LN82@Railgun_Qu@5
$LN86@Railgun_Qu@5:
  01457	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN82@Railgun_Qu@5:

; 5448 : 	     }
; 5449 :        i+=bm_bc[ch];

  0145d	03 7c 84 34	 add	 edi, DWORD PTR _bm_bc$[esp+eax*4+1080]
  01461	3b 7c 24 24	 cmp	 edi, DWORD PTR $T9799[esp+1080]
  01465	76 a9		 jbe	 SHORT $LL6@Railgun_Qu@5
$LN84@Railgun_Qu@5:

; 5450 :     }
; 5451 :     return(NULL);
; 5452 : } //if (cbTarget<961)
; 5453 : } //if ( cbPattern<4)
; 5454 : }

  01467	8b 8c 24 34 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1080]
  0146e	5f		 pop	 edi
  0146f	5e		 pop	 esi
  01470	5d		 pop	 ebp
  01471	5b		 pop	 ebx
  01472	33 cc		 xor	 ecx, esp
  01474	33 c0		 xor	 eax, eax
  01476	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0147b	81 c4 28 04 00
	00		 add	 esp, 1064		; 00000428H
  01481	c3		 ret	 0
_Railgun_Quadruplet_6pp_count_hits ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7m
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_countSTATIC$ = -1060					; size = 4
_AdvanceHopperGrass$ = -1060				; size = 4
_pbPattern$GSCopy$ = -1056				; size = 4
_ulHashPattern$ = -1052					; size = 4
tv594 = -1048						; size = 4
_pbTargetMax$ = -1048					; size = 4
$T9850 = -1044						; size = 4
_Quadruplet4th$ = -1044					; size = 4
_Quadruplet2nd$ = -1040					; size = 4
_Quadruplet3rd$ = -1036					; size = 4
tv565 = -1032						; size = 4
_bm_bc$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7m PROC

; 5464 : {

  01490	81 ec 24 04 00
	00		 sub	 esp, 1060		; 00000424H
  01496	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  0149b	33 c4		 xor	 eax, esp
  0149d	89 84 24 20 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1060], eax

; 5465 :     char * pbTargetMax = pbTarget + cbTarget;
; 5466 :     register unsigned long  ulHashPattern;
; 5467 :     unsigned long ulHashTarget;
; 5468 :     //unsigned long count; //r.6+
; 5469 :     signed long count;
; 5470 :     //unsigned long countSTATIC; //r.6+
; 5471 :     signed long countSTATIC;
; 5472 : //  unsigned long countRemainder;
; 5473 : 
; 5474 : /*
; 5475 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 5476 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 5477 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 5478 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 5479 : */
; 5480 :     unsigned char SINGLET;
; 5481 :     unsigned long Quadruplet2nd;
; 5482 :     unsigned long Quadruplet3rd;
; 5483 :     unsigned long Quadruplet4th;
; 5484 : 
; 5485 :     unsigned long  AdvanceHopperGrass;
; 5486 : 
; 5487 :     long i; //BMH needed
; 5488 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 5489 :     unsigned char ch; //BMH needed
; 5490 :     unsigned long chchchch; //BMH needed
; 5491 : //    unsigned char lastch, firstch; //BMH needed
; 5492 : 
; 5493 :     if (cbPattern > cbTarget)

  014a4	8b 94 24 34 04
	00 00		 mov	 edx, DWORD PTR _cbPattern$[esp+1056]
  014ab	53		 push	 ebx
  014ac	8b 9c 24 34 04
	00 00		 mov	 ebx, DWORD PTR _cbTarget$[esp+1060]
  014b3	55		 push	 ebp
  014b4	8b ac 24 30 04
	00 00		 mov	 ebp, DWORD PTR _pbTarget$[esp+1064]
  014bb	56		 push	 esi
  014bc	8b b4 24 38 04
	00 00		 mov	 esi, DWORD PTR _pbPattern$[esp+1068]
  014c3	57		 push	 edi
  014c4	8d 3c 2b	 lea	 edi, DWORD PTR [ebx+ebp]
  014c7	89 74 24 14	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1076], esi
  014cb	89 7c 24 1c	 mov	 DWORD PTR _pbTargetMax$[esp+1076], edi
  014cf	3b d3		 cmp	 edx, ebx

; 5494 :         return(NULL);

  014d1	77 46		 ja	 SHORT $LN5@Railgun_Qu@6

; 5495 : 
; 5496 : // Doesn't work when cbPattern = 1
; 5497 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 5498 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  014d3	83 fa 04	 cmp	 edx, 4
  014d6	0f 83 97 00 00
	00		 jae	 $LN41@Railgun_Qu@6

; 5499 :         pbTarget = pbTarget+cbPattern;
; 5500 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  014dc	0f be 06	 movsx	 eax, BYTE PTR [esi]
  014df	0f be 4c 16 ff	 movsx	 ecx, BYTE PTR [esi+edx-1]
  014e4	c1 e0 08	 shl	 eax, 8
  014e7	03 ea		 add	 ebp, edx
  014e9	03 c8		 add	 ecx, eax

; 5501 : //        countSTATIC = cbPattern-2;
; 5502 : 
; 5503 : if ( cbPattern==3) {

  014eb	83 fa 03	 cmp	 edx, 3
  014ee	75 49		 jne	 SHORT $LN46@Railgun_Qu@6
$LL39@Railgun_Qu@6:

; 5504 :     for ( ;; )
; 5505 :     {
; 5506 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  014f0	0f be 55 fd	 movsx	 edx, BYTE PTR [ebp-3]
  014f4	0f be 45 ff	 movsx	 eax, BYTE PTR [ebp-1]
  014f8	c1 e2 08	 shl	 edx, 8
  014fb	03 d0		 add	 edx, eax
  014fd	3b ca		 cmp	 ecx, edx
  014ff	75 08		 jne	 SHORT $LN36@Railgun_Qu@6

; 5507 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  01501	8a 56 01	 mov	 dl, BYTE PTR [esi+1]
  01504	3a 55 fe	 cmp	 dl, BYTE PTR [ebp-2]
  01507	74 2b		 je	 SHORT $LN53@Railgun_Qu@6
$LN36@Railgun_Qu@6:

; 5508 :         }
; 5509 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  01509	8b c1		 mov	 eax, ecx
  0150b	c1 e8 08	 shr	 eax, 8
  0150e	3a 45 fe	 cmp	 al, BYTE PTR [ebp-2]
  01511	74 01		 je	 SHORT $LN35@Railgun_Qu@6
  01513	45		 inc	 ebp
$LN35@Railgun_Qu@6:

; 5510 :         pbTarget++;

  01514	45		 inc	 ebp

; 5511 :         if (pbTarget > pbTargetMax)

  01515	3b ef		 cmp	 ebp, edi
  01517	76 d7		 jbe	 SHORT $LL39@Railgun_Qu@6
$LN5@Railgun_Qu@6:

; 5661 :     }
; 5662 :     return(NULL);

  01519	33 c0		 xor	 eax, eax
$LN13@Railgun_Qu@6:

; 5663 : } //if (cbTarget<961)
; 5664 : } //if ( cbPattern<4)
; 5665 : }

  0151b	8b 8c 24 30 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1076]
  01522	5f		 pop	 edi
  01523	5e		 pop	 esi
  01524	5d		 pop	 ebp
  01525	5b		 pop	 ebx
  01526	33 cc		 xor	 ecx, esp
  01528	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0152d	81 c4 24 04 00
	00		 add	 esp, 1060		; 00000424H
  01533	c3		 ret	 0
$LN53@Railgun_Qu@6:

; 5507 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  01534	8d 45 fd	 lea	 eax, DWORD PTR [ebp-3]

; 5512 :             return(NULL);

  01537	eb e2		 jmp	 SHORT $LN13@Railgun_Qu@6
$LN46@Railgun_Qu@6:

; 5513 :     }
; 5514 : } else {
; 5515 : }
; 5516 :     for ( ;; )
; 5517 :     {
; 5518 :         // The line below gives for 'cbPattern'>=1:
; 5519 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 5520 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 5521 : /*
; 5522 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 5523 :             return((long)(pbTarget-cbPattern));
; 5524 : */
; 5525 : 
; 5526 :         // The fragment below gives for 'cbPattern'>=2:
; 5527 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 5528 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 5529 : 
; 5530 : /*
; 5531 : //For 2 and 3 [
; 5532 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 5533 : //         count = countSTATIC;
; 5534 :          count = cbPattern-2;
; 5535 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5536 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 5537 :                count--;
; 5538 :          }
; 5539 :          if ( count == 0) return((pbTarget-cbPattern));
; 5540 :         }
; 5541 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 5542 : //For 2 and 3 ]
; 5543 : */
; 5544 : 
; 5545 : 
; 5546 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  01539	8a 45 ff	 mov	 al, BYTE PTR [ebp-1]
  0153c	0f be 55 fe	 movsx	 edx, BYTE PTR [ebp-2]
  01540	0f be f0	 movsx	 esi, al
  01543	c1 e2 08	 shl	 edx, 8
  01546	03 d6		 add	 edx, esi
  01548	3b ca		 cmp	 ecx, edx
  0154a	74 22		 je	 SHORT $LN55@Railgun_Qu@6
  0154c	8b d1		 mov	 edx, ecx
  0154e	c1 ea 08	 shr	 edx, 8
$LL32@Railgun_Qu@6:

; 5548 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  01551	3a d0		 cmp	 dl, al
  01553	74 01		 je	 SHORT $LN70@Railgun_Qu@6
  01555	45		 inc	 ebp
$LN70@Railgun_Qu@6:

; 5549 : 
; 5550 : 
; 5551 :         // The fragment below gives for 'cbPattern'>=2:
; 5552 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 5553 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 5554 : /*
; 5555 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 5556 :          count = countSTATIC>>2;
; 5557 :          countRemainder = countSTATIC % 4;
; 5558 : 
; 5559 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 5560 :                count--;
; 5561 :          }
; 5562 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 5563 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 5564 :                countRemainder--;
; 5565 :          }
; 5566 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 5567 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 5568 :          //}
; 5569 :         }
; 5570 : */
; 5571 : 
; 5572 :         pbTarget++;

  01556	45		 inc	 ebp

; 5573 :         if (pbTarget > pbTargetMax)

  01557	3b ef		 cmp	 ebp, edi
  01559	77 be		 ja	 SHORT $LN5@Railgun_Qu@6

; 5513 :     }
; 5514 : } else {
; 5515 : }
; 5516 :     for ( ;; )
; 5517 :     {
; 5518 :         // The line below gives for 'cbPattern'>=1:
; 5519 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 5520 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 5521 : /*
; 5522 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 5523 :             return((long)(pbTarget-cbPattern));
; 5524 : */
; 5525 : 
; 5526 :         // The fragment below gives for 'cbPattern'>=2:
; 5527 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 5528 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 5529 : 
; 5530 : /*
; 5531 : //For 2 and 3 [
; 5532 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 5533 : //         count = countSTATIC;
; 5534 :          count = cbPattern-2;
; 5535 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5536 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 5537 :                count--;
; 5538 :          }
; 5539 :          if ( count == 0) return((pbTarget-cbPattern));
; 5540 :         }
; 5541 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 5542 : //For 2 and 3 ]
; 5543 : */
; 5544 : 
; 5545 : 
; 5546 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  0155b	8a 45 ff	 mov	 al, BYTE PTR [ebp-1]
  0155e	0f be 75 fe	 movsx	 esi, BYTE PTR [ebp-2]
  01562	0f be d8	 movsx	 ebx, al
  01565	c1 e6 08	 shl	 esi, 8
  01568	03 f3		 add	 esi, ebx
  0156a	3b ce		 cmp	 ecx, esi
  0156c	75 e3		 jne	 SHORT $LL32@Railgun_Qu@6
$LN55@Railgun_Qu@6:

; 5547 :             return((pbTarget-2));

  0156e	8d 45 fe	 lea	 eax, DWORD PTR [ebp-2]

; 5574 :             return(NULL);

  01571	eb a8		 jmp	 SHORT $LN13@Railgun_Qu@6
$LN41@Railgun_Qu@6:

; 5575 :     }
; 5576 : } else { //if ( cbPattern<4)
; 5577 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  01573	81 fb c1 03 00
	00		 cmp	 ebx, 961		; 000003c1H
  01579	0f 83 d3 00 00
	00		 jae	 $LN26@Railgun_Qu@6

; 5578 : {
; 5579 :         pbTarget = pbTarget+cbPattern;
; 5580 :         ulHashPattern = *(unsigned long *)(pbPattern);

  0157f	8b 0e		 mov	 ecx, DWORD PTR [esi]

; 5581 : //        countSTATIC = cbPattern-1;
; 5582 : 
; 5583 :     //SINGLET = *(char *)(pbPattern);
; 5584 :     SINGLET = ulHashPattern & 0xFF;
; 5585 :     Quadruplet2nd = SINGLET<<8;

  01581	0f b6 c1	 movzx	 eax, cl
  01584	8b f8		 mov	 edi, eax
  01586	c1 e7 08	 shl	 edi, 8
  01589	89 7c 24 24	 mov	 DWORD PTR _Quadruplet2nd$[esp+1076], edi

; 5586 :     Quadruplet3rd = SINGLET<<16;

  0158d	8b f8		 mov	 edi, eax
  0158f	c1 e7 10	 shl	 edi, 16			; 00000010H
  01592	03 ea		 add	 ebp, edx
  01594	89 44 24 2c	 mov	 DWORD PTR tv565[esp+1076], eax

; 5587 :     Quadruplet4th = SINGLET<<24;

  01598	c1 e0 18	 shl	 eax, 24			; 00000018H
  0159b	89 4c 24 18	 mov	 DWORD PTR _ulHashPattern$[esp+1076], ecx
  0159f	89 7c 24 28	 mov	 DWORD PTR _Quadruplet3rd$[esp+1076], edi
  015a3	89 44 24 20	 mov	 DWORD PTR _Quadruplet4th$[esp+1076], eax
$LL25@Railgun_Qu@6:

; 5588 : 
; 5589 :     for ( ;; )
; 5590 :     {
; 5591 : 	AdvanceHopperGrass = 0;
; 5592 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  015a7	8b c5		 mov	 eax, ebp
  015a9	2b c2		 sub	 eax, edx
  015ab	8b 00		 mov	 eax, DWORD PTR [eax]
  015ad	33 db		 xor	 ebx, ebx
  015af	89 5c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1076], ebx

; 5593 : 
; 5594 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  015b3	3b c8		 cmp	 ecx, eax
  015b5	75 4e		 jne	 SHORT $LN23@Railgun_Qu@6

; 5595 : //         count = countSTATIC;
; 5596 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5597 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 5598 : //               count--;
; 5599 : //         }
; 5600 :          count = cbPattern-1;

  015b7	8d 42 ff	 lea	 eax, DWORD PTR [edx-1]

; 5601 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  015ba	85 c0		 test	 eax, eax
  015bc	74 34		 je	 SHORT $LN65@Railgun_Qu@6

; 5595 : //         count = countSTATIC;
; 5596 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 5597 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 5598 : //               count--;
; 5599 : //         }
; 5600 :          count = cbPattern-1;

  015be	8b fd		 mov	 edi, ebp
  015c0	2b f0		 sub	 esi, eax
  015c2	2b f8		 sub	 edi, eax
  015c4	03 f2		 add	 esi, edx
$LL22@Railgun_Qu@6:

; 5601 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  015c6	8a 0f		 mov	 cl, BYTE PTR [edi]
  015c8	38 0e		 cmp	 BYTE PTR [esi], cl
  015ca	75 2f		 jne	 SHORT $LN21@Railgun_Qu@6

; 5602 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  015cc	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  015cf	03 d8		 add	 ebx, eax
  015d1	3b cb		 cmp	 ecx, ebx
  015d3	75 14		 jne	 SHORT $LN68@Railgun_Qu@6
  015d5	0f be 0f	 movsx	 ecx, BYTE PTR [edi]
  015d8	39 4c 24 2c	 cmp	 DWORD PTR tv565[esp+1076], ecx
  015dc	74 0b		 je	 SHORT $LN68@Railgun_Qu@6
  015de	8b 5c 24 10	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+1076]
  015e2	43		 inc	 ebx
  015e3	89 5c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1076], ebx
  015e7	eb 04		 jmp	 SHORT $LN20@Railgun_Qu@6
$LN68@Railgun_Qu@6:
  015e9	8b 5c 24 10	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+1076]
$LN20@Railgun_Qu@6:

; 5603 :                count--;

  015ed	46		 inc	 esi
  015ee	47		 inc	 edi
  015ef	48		 dec	 eax
  015f0	75 d4		 jne	 SHORT $LL22@Railgun_Qu@6
$LN65@Railgun_Qu@6:

; 5604 :          }
; 5605 :          if ( count == 0) return((pbTarget-cbPattern));

  015f2	8b c5		 mov	 eax, ebp
  015f4	2b c2		 sub	 eax, edx

; 5620 :             return(NULL);

  015f6	e9 20 ff ff ff	 jmp	 $LN13@Railgun_Qu@6
$LN21@Railgun_Qu@6:

; 5604 :          }
; 5605 :          if ( count == 0) return((pbTarget-cbPattern));

  015fb	85 c0		 test	 eax, eax
  015fd	74 f3		 je	 SHORT $LN65@Railgun_Qu@6

; 5606 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  015ff	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  01603	eb 36		 jmp	 SHORT $LN15@Railgun_Qu@6
$LN23@Railgun_Qu@6:

; 5607 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  01605	8b c8		 mov	 ecx, eax
  01607	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  0160d	39 4c 24 24	 cmp	 DWORD PTR _Quadruplet2nd$[esp+1076], ecx
  01611	74 28		 je	 SHORT $LN15@Railgun_Qu@6

; 5608 :          AdvanceHopperGrass++;
; 5609 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  01613	8b c8		 mov	 ecx, eax
  01615	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  0161b	bb 01 00 00 00	 mov	 ebx, 1
  01620	39 4c 24 28	 cmp	 DWORD PTR _Quadruplet3rd$[esp+1076], ecx
  01624	74 15		 je	 SHORT $LN15@Railgun_Qu@6

; 5610 :               AdvanceHopperGrass++;
; 5611 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  01626	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  0162b	bb 02 00 00 00	 mov	 ebx, 2
  01630	39 44 24 20	 cmp	 DWORD PTR _Quadruplet4th$[esp+1076], eax
  01634	74 05		 je	 SHORT $LN15@Railgun_Qu@6
  01636	bb 03 00 00 00	 mov	 ebx, 3
$LN15@Railgun_Qu@6:

; 5612 :          }
; 5613 :     }
; 5614 : 	}
; 5615 : 
; 5616 : 	AdvanceHopperGrass++;
; 5617 : 
; 5618 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  0163b	8d 6c 2b 01	 lea	 ebp, DWORD PTR [ebx+ebp+1]

; 5619 :         if (pbTarget > pbTargetMax)

  0163f	3b 6c 24 1c	 cmp	 ebp, DWORD PTR _pbTargetMax$[esp+1076]
  01643	0f 87 d0 fe ff
	ff		 ja	 $LN5@Railgun_Qu@6

; 5621 :     }

  01649	8b 4c 24 18	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+1076]
  0164d	e9 55 ff ff ff	 jmp	 $LL25@Railgun_Qu@6
$LN26@Railgun_Qu@6:

; 5622 : } else { //if (cbTarget<961)
; 5623 :         //countSTATIC = cbPattern-2; //r.6+
; 5624 :         //countSTATIC = cbPattern-2-3;
; 5625 :         //countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!
; 5626 :         //countSTATIC = cbPattern-2-3; // r.7- At last no recompared bytes in-between chars
; 5627 :         countSTATIC = cbPattern-2-2; // r.7 
; 5628 :         ulHashPattern = *(unsigned long *)(pbPattern+cbPattern-1-3);

  01652	8b 44 24 14	 mov	 eax, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  01656	8b 4c 10 fc	 mov	 ecx, DWORD PTR [eax+edx-4]
  0165a	89 4c 24 18	 mov	 DWORD PTR _ulHashPattern$[esp+1076], ecx

; 5629 : // Next line fixes the BUG from r.6++: but with awful speed degradation! So the bug is fixed in the definitions by setting 'countSTATIC = cbPattern-2-2;', bug appears only for patterns with lengths of 4, The setback is one unnecessary comparison for 5bytes patterns, stupidly such setback exists (from before) for 4bytes as well.
; 5630 : //if (countSTATIC<0) countSTATIC=0;
; 5631 :     /* Preprocessing */
; 5632 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  0165e	8b c2		 mov	 eax, edx
  01660	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  01665	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc$[esp+1076]
  01669	f3 ab		 rep stosd

; 5633 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  0166b	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  0166e	8d 72 fc	 lea	 esi, DWORD PTR [edx-4]
  01671	33 c0		 xor	 eax, eax
  01673	89 74 24 10	 mov	 DWORD PTR _countSTATIC$[esp+1076], esi
  01677	85 c9		 test	 ecx, ecx
  01679	74 1b		 je	 SHORT $LN7@Railgun_Qu@6
  0167b	8d 72 ff	 lea	 esi, DWORD PTR [edx-1]
  0167e	8b ff		 npad	 2
$LL9@Railgun_Qu@6:
  01680	8b 7c 24 14	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  01684	0f be 3c 07	 movsx	 edi, BYTE PTR [edi+eax]
  01688	89 74 bc 30	 mov	 DWORD PTR _bm_bc$[esp+edi*4+1076], esi
  0168c	40		 inc	 eax
  0168d	4e		 dec	 esi
  0168e	3b c1		 cmp	 eax, ecx
  01690	72 ee		 jb	 SHORT $LL9@Railgun_Qu@6
  01692	8b 74 24 10	 mov	 esi, DWORD PTR _countSTATIC$[esp+1076]
$LN7@Railgun_Qu@6:

; 5634 : 
; 5635 :     /* Searching */
; 5636 :     //lastch=pbPattern[cbPattern-1];
; 5637 :     //firstch=pbPattern[0];
; 5638 :     i=0;

  01696	33 ff		 xor	 edi, edi

; 5639 :     while (i <= cbTarget-cbPattern) {

  01698	2b da		 sub	 ebx, edx
  0169a	8d 54 2a fc	 lea	 edx, DWORD PTR [edx+ebp-4]
  0169e	89 5c 24 20	 mov	 DWORD PTR $T9850[esp+1076], ebx
  016a2	89 54 24 1c	 mov	 DWORD PTR tv594[esp+1076], edx
  016a6	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL6@Railgun_Qu@6:

; 5640 :        //ch=pbTarget[i+cbPattern-1];
; 5641 :        chchchch=*(unsigned long *)&pbTarget[i+cbPattern-1-3];

  016b0	8b 44 24 1c	 mov	 eax, DWORD PTR tv594[esp+1076]
  016b4	8b 14 38	 mov	 edx, DWORD PTR [eax+edi]

; 5642 :        //if (ch ==lastch)
; 5643 :           //if (memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) OUTPUT(i);
; 5644 :           //if (ch == lastch && pbTarget[i] == firstch && memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 5645 :           //if (ch == pbPattern[cbPattern-1] && pbTarget[i] == pbPattern[0]) // r.6+
; 5646 :           //if (ch == pbPattern[cbPattern-1] && *(long *)&pbTarget[i] == *(long *)&pbPattern[0]) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 5647 :           //if (ch == pbPattern[cbPattern-1] && *(long *)&pbTarget[i] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 5648 :           if (chchchch == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.

  016b7	3b 54 24 18	 cmp	 edx, DWORD PTR _ulHashPattern$[esp+1076]
  016bb	75 2e		 jne	 SHORT $LN1@Railgun_Qu@6

; 5649 :              {
; 5650 :          count = countSTATIC;

  016bd	8b c6		 mov	 eax, esi

; 5651 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5652 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5653 :          //while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 5654 : // The next line is somewhat stupid - it compares backwardly, AFAIK the CPU won't cache the previous 32bytes but the next?!
; 5655 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)) == *(char *)(&pbTarget[i]+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  016bf	85 f6		 test	 esi, esi
  016c1	74 18		 je	 SHORT $LN59@Railgun_Qu@6

; 5649 :              {
; 5650 :          count = countSTATIC;

  016c3	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  016c7	8d 0c 2f	 lea	 ecx, DWORD PTR [edi+ebp]
  016ca	8d 9b 00 00 00
	00		 npad	 6
$LL3@Railgun_Qu@6:

; 5651 :          //while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) { // r.6+
; 5652 : // A BUG (in next line) crushed from r.6++: 'count !=0' becomes 'count >0' in r.6+++ but with awful speed degradation! So the bug is fixed outside the cycles by setting 'countSTATIC' from -1 to 0, bug appears only for patterns with lengths of 4.
; 5653 :          //while ( count !=0 && *(char *)(pbPattern+1+3+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+3+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 5654 : // The next line is somewhat stupid - it compares backwardly, AFAIK the CPU won't cache the previous 32bytes but the next?!
; 5655 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)) == *(char *)(&pbTarget[i]+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  016d0	8a 1e		 mov	 bl, BYTE PTR [esi]
  016d2	3a 19		 cmp	 bl, BYTE PTR [ecx]
  016d4	75 0d		 jne	 SHORT $LN2@Railgun_Qu@6

; 5656 :                count--;

  016d6	41		 inc	 ecx
  016d7	46		 inc	 esi
  016d8	48		 dec	 eax
  016d9	75 f5		 jne	 SHORT $LL3@Railgun_Qu@6
$LN59@Railgun_Qu@6:

; 5657 :          }
; 5658 :          if ( count == 0) return(pbTarget+i);

  016db	8d 04 2f	 lea	 eax, DWORD PTR [edi+ebp]
  016de	e9 38 fe ff ff	 jmp	 $LN13@Railgun_Qu@6
$LN2@Railgun_Qu@6:
  016e3	85 c0		 test	 eax, eax
  016e5	74 f4		 je	 SHORT $LN59@Railgun_Qu@6
  016e7	8b 74 24 10	 mov	 esi, DWORD PTR _countSTATIC$[esp+1076]
$LN1@Railgun_Qu@6:

; 5659 : 	     }
; 5660 :        i+=bm_bc[(char)(chchchch>>24)];

  016eb	c1 ea 18	 shr	 edx, 24			; 00000018H
  016ee	0f be ca	 movsx	 ecx, dl
  016f1	03 7c 8c 30	 add	 edi, DWORD PTR _bm_bc$[esp+ecx*4+1076]
  016f5	3b 7c 24 20	 cmp	 edi, DWORD PTR $T9850[esp+1076]
  016f9	76 b5		 jbe	 SHORT $LL6@Railgun_Qu@6

; 5639 :     while (i <= cbTarget-cbPattern) {

  016fb	e9 19 fe ff ff	 jmp	 $LN5@Railgun_Qu@6
_Railgun_Quadruplet_7m ENDP
_TEXT	ENDS
PUBLIC	_SS_size$GSCopy$
PUBLIC	_SS$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_volnitsky2
EXTRN	_exit:PROC
EXTRN	__chkstk:PROC
EXTRN	_memset:PROC
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_SS_size$GSCopy$ = -65552				; size = 4
_SS$GSCopy$ = -65548					; size = 4
$T9872 = -65544						; size = 4
_H$ = -65540						; size = 65536
__$ArrayPad$ = -4					; size = 4
_S$ = 8							; size = 4
_SS$ = 12						; size = 4
_S_size$ = 16						; size = 4
_SS_size$ = 20						; size = 4
_volnitsky2 PROC

; 5718 : char* volnitsky2(char * S, char * SS, unsigned long S_size, unsigned long SS_size) {

  01700	b8 10 00 01 00	 mov	 eax, 65552		; 00010010H
  01705	e8 00 00 00 00	 call	 __chkstk
  0170a	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  0170f	33 c4		 xor	 eax, esp
  01711	89 84 24 0c 00
	01 00		 mov	 DWORD PTR __$ArrayPad$[esp+65552], eax
  01718	53		 push	 ebx
  01719	8b 9c 24 1c 00
	01 00		 mov	 ebx, DWORD PTR _SS$[esp+65552]
  01720	55		 push	 ebp
  01721	56		 push	 esi
  01722	57		 push	 edi
  01723	8b bc 24 30 00
	01 00		 mov	 edi, DWORD PTR _SS_size$[esp+65564]

; 5719 : 
; 5720 : 		typedef         uint16_t        W_t;
; 5721 : 		typedef         uint8_t         offset_t;
; 5722 : 
; 5723 :         const size_t    H_size     = 64*1024;	
; 5724 :         offset_t 	H[64*1024]  = {0};	// {0} - initializes ALL buckets with 0

  0172a	68 ff ff 00 00	 push	 65535			; 0000ffffH
  0172f	8d 44 24 21	 lea	 eax, DWORD PTR _H$[esp+65573]
  01733	6a 00		 push	 0
  01735	50		 push	 eax

; 5748 : 		for  (h = *(W_t*) P  %  H_size;    H[h];    h = (h+1) % H_size )  {

  01736	89 5c 24 20	 mov	 DWORD PTR _SS$GSCopy$[esp+65580], ebx
  0173a	89 7c 24 1c	 mov	 DWORD PTR _SS_size$GSCopy$[esp+65580], edi
  0173e	c6 44 24 28 00	 mov	 BYTE PTR _H$[esp+65580], 0
  01743	e8 00 00 00 00	 call	 _memset
  01748	8b 94 24 38 00
	01 00		 mov	 edx, DWORD PTR _S_size$[esp+65576]
  0174f	8b 8c 24 30 00
	01 00		 mov	 ecx, DWORD PTR _S$[esp+65576]
  01756	83 c4 0c	 add	 esp, 12			; 0000000cH
  01759	8d 34 11	 lea	 esi, DWORD PTR [ecx+edx]
  0175c	8d 6c 0f fe	 lea	 ebp, DWORD PTR [edi+ecx-2]
  01760	81 fa 20 4e 00
	00		 cmp	 edx, 20000		; 00004e20H
  01766	0f 82 b1 00 00
	00		 jb	 $LN16@volnitsky2

; 5725 : 
; 5726 : 	size_t  h;
; 5727 : 	int  i;
; 5728 : 
; 5729 :         const size_t    W_size   = sizeof(W_t);
; 5730 :         //const size_t    S_size   = Se - S;
; 5731 :         //const size_t    SS_size  = SSe - SS;
; 5732 :         const size_t    step     = SS_size - W_size + 1;
; 5733 : 
; 5734 : 	char* Se = S + S_size;
; 5735 :         char* P = S + SS_size - W_size;
; 5736 : 	char* R;
; 5737 : 
; 5738 :         if  ( S_size < 20000 || SS_size < 2*W_size-1 )	

  0176c	83 ff 03	 cmp	 edi, 3
  0176f	0f 82 a8 00 00
	00		 jb	 $LN16@volnitsky2

; 5740 : 
; 5741 :         for  ( i = SS_size-W_size;    i >= 0;   i-- )   {

  01775	8d 4f fe	 lea	 ecx, DWORD PTR [edi-2]
  01778	85 c9		 test	 ecx, ecx
  0177a	78 2b		 js	 SHORT $LN13@volnitsky2
  0177c	8d 64 24 00	 npad	 4
$LL15@volnitsky2:

; 5742 :                 h  =  *(W_t*) (SS+i)  % H_size;

  01780	0f b7 04 0b	 movzx	 eax, WORD PTR [ebx+ecx]

; 5743 :                 while (H[h])    h = (h+1) % H_size;        	

  01784	80 7c 04 1c 00	 cmp	 BYTE PTR _H$[esp+eax+65568], 0
  01789	74 12		 je	 SHORT $LN11@volnitsky2
  0178b	eb 03 8d 49 00	 npad	 5
$LL12@volnitsky2:
  01790	40		 inc	 eax
  01791	25 ff ff 00 00	 and	 eax, 65535		; 0000ffffH
  01796	80 7c 04 1c 00	 cmp	 BYTE PTR _H$[esp+eax+65568], 0
  0179b	75 f3		 jne	 SHORT $LL12@volnitsky2
$LN11@volnitsky2:

; 5744 :                 H[h] = i+1;

  0179d	8d 51 01	 lea	 edx, DWORD PTR [ecx+1]
  017a0	49		 dec	 ecx
  017a1	88 54 04 1c	 mov	 BYTE PTR _H$[esp+eax+65568], dl
  017a5	79 d9		 jns	 SHORT $LL15@volnitsky2
$LN13@volnitsky2:

; 5745 :         }
; 5746 : 
; 5747 :         for  (;   P <= Se-SS_size;   P += step)  {

  017a7	2b f7		 sub	 esi, edi
  017a9	8b ce		 mov	 ecx, esi

; 5748 : 		for  (h = *(W_t*) P  %  H_size;    H[h];    h = (h+1) % H_size )  {

  017ab	89 4c 24 18	 mov	 DWORD PTR $T9872[esp+65568], ecx
  017af	3b e9		 cmp	 ebp, ecx
  017b1	77 4f		 ja	 SHORT $LN8@volnitsky2
$LL10@volnitsky2:
  017b3	0f b7 55 00	 movzx	 edx, WORD PTR [ebp]
  017b7	80 7c 14 1c 00	 cmp	 BYTE PTR _H$[esp+edx+65568], 0
  017bc	74 39		 je	 SHORT $LN9@volnitsky2
  017be	8b ff		 npad	 2
$LL30@volnitsky2:

; 5749 : 			R  =  P - (H[h] - 1);

  017c0	0f b6 4c 14 1c	 movzx	 ecx, BYTE PTR _H$[esp+edx+65568]

; 5750 : 			for  ( i=0;  i<SS_size;  i++)  {

  017c5	8b 7c 24 14	 mov	 edi, DWORD PTR _SS$GSCopy$[esp+65568]
  017c9	8b c5		 mov	 eax, ebp
  017cb	2b c1		 sub	 eax, ecx
  017cd	40		 inc	 eax
  017ce	33 f6		 xor	 esi, esi
  017d0	8b c8		 mov	 ecx, eax
  017d2	2b f8		 sub	 edi, eax
$LL4@volnitsky2:
  017d4	3b 74 24 10	 cmp	 esi, DWORD PTR _SS_size$GSCopy$[esp+65568]
  017d8	73 2a		 jae	 SHORT $LN18@volnitsky2

; 5751 : 				if  (R[i] != SS[i])   goto next_hash_cell;

  017da	8a 19		 mov	 bl, BYTE PTR [ecx]
  017dc	3a 1c 0f	 cmp	 bl, BYTE PTR [edi+ecx]
  017df	75 04		 jne	 SHORT $next_hash_cell$6002

; 5750 : 			for  ( i=0;  i<SS_size;  i++)  {

  017e1	46		 inc	 esi
  017e2	41		 inc	 ecx
  017e3	eb ef		 jmp	 SHORT $LL4@volnitsky2
$next_hash_cell$6002:

; 5748 : 		for  (h = *(W_t*) P  %  H_size;    H[h];    h = (h+1) % H_size )  {

  017e5	42		 inc	 edx
  017e6	81 e2 ff ff 00
	00		 and	 edx, 65535		; 0000ffffH
  017ec	80 7c 14 1c 00	 cmp	 BYTE PTR _H$[esp+edx+65568], 0
  017f1	75 cd		 jne	 SHORT $LL30@volnitsky2
  017f3	8b 4c 24 18	 mov	 ecx, DWORD PTR $T9872[esp+65568]
$LN9@volnitsky2:

; 5745 :         }
; 5746 : 
; 5747 :         for  (;   P <= Se-SS_size;   P += step)  {

  017f7	8b 44 24 10	 mov	 eax, DWORD PTR _SS_size$GSCopy$[esp+65568]
  017fb	48		 dec	 eax
  017fc	03 e8		 add	 ebp, eax
  017fe	3b e9		 cmp	 ebp, ecx
  01800	76 b1		 jbe	 SHORT $LL10@volnitsky2
$LN8@volnitsky2:

; 5752 : 			}
; 5753 : 			return R;			// found
; 5754 : 			next_hash_cell:;
; 5755 : 		}
; 5756 :         }
; 5757 : 
; 5758 : 	return(NULL); // No matter it's buggy

  01802	33 c0		 xor	 eax, eax
$LN18@volnitsky2:

; 5759 : 	// check tail
; 5760 :         //return  std::search(P-step+1,Se,SS,SSe); 	
; 5761 : };

  01804	8b 8c 24 1c 00
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+65568]
  0180b	5f		 pop	 edi
  0180c	5e		 pop	 esi
  0180d	5d		 pop	 ebp
  0180e	5b		 pop	 ebx
  0180f	33 cc		 xor	 ecx, esp
  01811	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01816	81 c4 10 00 01
	00		 add	 esp, 65552		; 00010010H
  0181c	c3		 ret	 0
$LN16@volnitsky2:

; 5739 :                 exit(13); //return  std::search(S,Se,SS,SSe);	// fall-back to std::search

  0181d	6a 0d		 push	 13			; 0000000dH
  0181f	e8 00 00 00 00	 call	 _exit
$LN31@volnitsky2:
  01824	cc		 int	 3
_volnitsky2 ENDP
_TEXT	ENDS
PUBLIC	_SS_size$GSCopy$
PUBLIC	_SS$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_volnitsky4
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_SS_size$GSCopy$ = -65552				; size = 4
_SS$GSCopy$ = -65548					; size = 4
$T9891 = -65544						; size = 4
_H$ = -65540						; size = 65536
__$ArrayPad$ = -4					; size = 4
_S$ = 8							; size = 4
_SS$ = 12						; size = 4
_S_size$ = 16						; size = 4
_SS_size$ = 20						; size = 4
_volnitsky4 PROC

; 5764 : char* volnitsky4(char * S, char * SS, unsigned long S_size, unsigned long SS_size) {

  01830	b8 10 00 01 00	 mov	 eax, 65552		; 00010010H
  01835	e8 00 00 00 00	 call	 __chkstk
  0183a	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  0183f	33 c4		 xor	 eax, esp
  01841	89 84 24 0c 00
	01 00		 mov	 DWORD PTR __$ArrayPad$[esp+65552], eax
  01848	53		 push	 ebx
  01849	8b 9c 24 1c 00
	01 00		 mov	 ebx, DWORD PTR _SS$[esp+65552]
  01850	55		 push	 ebp
  01851	56		 push	 esi
  01852	57		 push	 edi
  01853	8b bc 24 30 00
	01 00		 mov	 edi, DWORD PTR _SS_size$[esp+65564]

; 5765 : 
; 5766 : 		typedef         uint32_t        W_t;
; 5767 : 		typedef         uint8_t         offset_t;
; 5768 : 
; 5769 :         const size_t    H_size     = 64*1024;	
; 5770 :         offset_t 	H[64*1024]  = {0};	// {0} - initializes ALL buckets with 0

  0185a	68 ff ff 00 00	 push	 65535			; 0000ffffH
  0185f	8d 44 24 21	 lea	 eax, DWORD PTR _H$[esp+65573]
  01863	6a 00		 push	 0
  01865	50		 push	 eax

; 5794 : 		for  (h = *(W_t*) P  %  H_size;    H[h];    h = (h+1) % H_size )  {

  01866	89 5c 24 20	 mov	 DWORD PTR _SS$GSCopy$[esp+65580], ebx
  0186a	89 7c 24 1c	 mov	 DWORD PTR _SS_size$GSCopy$[esp+65580], edi
  0186e	c6 44 24 28 00	 mov	 BYTE PTR _H$[esp+65580], 0
  01873	e8 00 00 00 00	 call	 _memset
  01878	8b 94 24 38 00
	01 00		 mov	 edx, DWORD PTR _S_size$[esp+65576]
  0187f	8b 8c 24 30 00
	01 00		 mov	 ecx, DWORD PTR _S$[esp+65576]
  01886	83 c4 0c	 add	 esp, 12			; 0000000cH
  01889	8d 34 11	 lea	 esi, DWORD PTR [ecx+edx]
  0188c	8d 6c 0f fc	 lea	 ebp, DWORD PTR [edi+ecx-4]
  01890	81 fa 20 4e 00
	00		 cmp	 edx, 20000		; 00004e20H
  01896	0f 82 b3 00 00
	00		 jb	 $LN16@volnitsky4

; 5771 : 
; 5772 : 	size_t  h;
; 5773 : 	int  i;
; 5774 : 
; 5775 :         const size_t    W_size   = sizeof(W_t);
; 5776 :         //const size_t    S_size   = Se - S;
; 5777 :         //const size_t    SS_size  = SSe - SS;
; 5778 :         const size_t    step     = SS_size - W_size + 1;
; 5779 : 
; 5780 : 	char* Se = S + S_size;
; 5781 :         char* P = S + SS_size - W_size;
; 5782 : 	char* R;
; 5783 : 
; 5784 :         if  ( S_size < 20000 || SS_size < 2*W_size-1 )	

  0189c	83 ff 07	 cmp	 edi, 7
  0189f	0f 82 aa 00 00
	00		 jb	 $LN16@volnitsky4

; 5786 : 
; 5787 :         for  ( i = SS_size-W_size;    i >= 0;   i-- )   {

  018a5	8d 4f fc	 lea	 ecx, DWORD PTR [edi-4]
  018a8	85 c9		 test	 ecx, ecx
  018aa	78 2b		 js	 SHORT $LN13@volnitsky4
  018ac	8d 64 24 00	 npad	 4
$LL15@volnitsky4:

; 5788 :                 h  =  *(W_t*) (SS+i)  % H_size;

  018b0	0f b7 04 0b	 movzx	 eax, WORD PTR [ebx+ecx]

; 5789 :                 while (H[h])    h = (h+1) % H_size;        	

  018b4	80 7c 04 1c 00	 cmp	 BYTE PTR _H$[esp+eax+65568], 0
  018b9	74 12		 je	 SHORT $LN11@volnitsky4
  018bb	eb 03 8d 49 00	 npad	 5
$LL12@volnitsky4:
  018c0	40		 inc	 eax
  018c1	25 ff ff 00 00	 and	 eax, 65535		; 0000ffffH
  018c6	80 7c 04 1c 00	 cmp	 BYTE PTR _H$[esp+eax+65568], 0
  018cb	75 f3		 jne	 SHORT $LL12@volnitsky4
$LN11@volnitsky4:

; 5790 :                 H[h] = i+1;

  018cd	8d 51 01	 lea	 edx, DWORD PTR [ecx+1]
  018d0	49		 dec	 ecx
  018d1	88 54 04 1c	 mov	 BYTE PTR _H$[esp+eax+65568], dl
  018d5	79 d9		 jns	 SHORT $LL15@volnitsky4
$LN13@volnitsky4:

; 5791 :         }
; 5792 : 
; 5793 :         for  (;   P <= Se-SS_size;   P += step)  {

  018d7	2b f7		 sub	 esi, edi
  018d9	8b ce		 mov	 ecx, esi

; 5794 : 		for  (h = *(W_t*) P  %  H_size;    H[h];    h = (h+1) % H_size )  {

  018db	89 4c 24 18	 mov	 DWORD PTR $T9891[esp+65568], ecx
  018df	3b e9		 cmp	 ebp, ecx
  018e1	77 51		 ja	 SHORT $LN8@volnitsky4
$LL10@volnitsky4:
  018e3	0f b7 55 00	 movzx	 edx, WORD PTR [ebp]
  018e7	80 7c 14 1c 00	 cmp	 BYTE PTR _H$[esp+edx+65568], 0
  018ec	74 39		 je	 SHORT $LN9@volnitsky4
  018ee	8b ff		 npad	 2
$LL30@volnitsky4:

; 5795 : 			R  =  P - (H[h] - 1);

  018f0	0f b6 4c 14 1c	 movzx	 ecx, BYTE PTR _H$[esp+edx+65568]

; 5796 : 			for  ( i=0;  i<SS_size;  i++)  {

  018f5	8b 7c 24 14	 mov	 edi, DWORD PTR _SS$GSCopy$[esp+65568]
  018f9	8b c5		 mov	 eax, ebp
  018fb	2b c1		 sub	 eax, ecx
  018fd	40		 inc	 eax
  018fe	33 f6		 xor	 esi, esi
  01900	8b c8		 mov	 ecx, eax
  01902	2b f8		 sub	 edi, eax
$LL4@volnitsky4:
  01904	3b 74 24 10	 cmp	 esi, DWORD PTR _SS_size$GSCopy$[esp+65568]
  01908	73 2c		 jae	 SHORT $LN18@volnitsky4

; 5797 : 				if  (R[i] != SS[i])   goto next_hash_cell;

  0190a	8a 19		 mov	 bl, BYTE PTR [ecx]
  0190c	3a 1c 0f	 cmp	 bl, BYTE PTR [edi+ecx]
  0190f	75 04		 jne	 SHORT $next_hash_cell$6046

; 5796 : 			for  ( i=0;  i<SS_size;  i++)  {

  01911	46		 inc	 esi
  01912	41		 inc	 ecx
  01913	eb ef		 jmp	 SHORT $LL4@volnitsky4
$next_hash_cell$6046:

; 5794 : 		for  (h = *(W_t*) P  %  H_size;    H[h];    h = (h+1) % H_size )  {

  01915	42		 inc	 edx
  01916	81 e2 ff ff 00
	00		 and	 edx, 65535		; 0000ffffH
  0191c	80 7c 14 1c 00	 cmp	 BYTE PTR _H$[esp+edx+65568], 0
  01921	75 cd		 jne	 SHORT $LL30@volnitsky4
  01923	8b 4c 24 18	 mov	 ecx, DWORD PTR $T9891[esp+65568]
$LN9@volnitsky4:

; 5791 :         }
; 5792 : 
; 5793 :         for  (;   P <= Se-SS_size;   P += step)  {

  01927	8b 44 24 10	 mov	 eax, DWORD PTR _SS_size$GSCopy$[esp+65568]
  0192b	83 c0 fd	 add	 eax, -3			; fffffffdH
  0192e	03 e8		 add	 ebp, eax
  01930	3b e9		 cmp	 ebp, ecx
  01932	76 af		 jbe	 SHORT $LL10@volnitsky4
$LN8@volnitsky4:

; 5798 : 			}
; 5799 : 			return R;			// found
; 5800 : 			next_hash_cell:;
; 5801 : 		}
; 5802 :         }
; 5803 : 
; 5804 : 	return(NULL); // No matter it's buggy

  01934	33 c0		 xor	 eax, eax
$LN18@volnitsky4:

; 5805 : 	// check tail
; 5806 :         //return  std::search(P-step+1,Se,SS,SSe); 	
; 5807 : };

  01936	8b 8c 24 1c 00
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+65568]
  0193d	5f		 pop	 edi
  0193e	5e		 pop	 esi
  0193f	5d		 pop	 ebp
  01940	5b		 pop	 ebx
  01941	33 cc		 xor	 ecx, esp
  01943	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01948	81 c4 10 00 01
	00		 add	 esp, 65552		; 00010010H
  0194e	c3		 ret	 0
$LN16@volnitsky4:

; 5785 :                 exit(13); //return  std::search(S,Se,SS,SSe);	// fall-back to std::search

  0194f	6a 0d		 push	 13			; 0000000dH
  01951	e8 00 00 00 00	 call	 _exit
$LN31@volnitsky4:
  01956	cc		 int	 3
_volnitsky4 ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7Gulliver
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
tv1191 = -67628						; size = 4
tv1098 = -67628						; size = 4
_AdvanceHopperGrass$ = -67628				; size = 4
_pbPattern$GSCopy$ = -67624				; size = 4
tv931 = -67617						; size = 1
_countSTATIC$ = -67616					; size = 4
_pbTargetMax$ = -67616					; size = 4
tv786 = -67612						; size = 4
tv662 = -67612						; size = 4
_ulHashPattern$ = -67608				; size = 4
_Quadruplet3rd$ = -67604				; size = 4
_Quadruplet2nd$ = -67600				; size = 4
_Quadruplet4th$ = -67596				; size = 4
_bm_bc2nd$ = -67592					; size = 1024
_bm_bc$ = -66568					; size = 1024
_bm_Horspool_Order2$ = -65544				; size = 65536
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7Gulliver PROC

; 5815 : {

  01960	55		 push	 ebp
  01961	8b ec		 mov	 ebp, esp
  01963	83 e4 f8	 and	 esp, -8			; fffffff8H
  01966	b8 2c 08 01 00	 mov	 eax, 67628		; 0001082cH
  0196b	e8 00 00 00 00	 call	 __chkstk
  01970	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  01975	33 c4		 xor	 eax, esp
  01977	89 84 24 28 08
	01 00		 mov	 DWORD PTR __$ArrayPad$[esp+67628], eax

; 5816 : 	char * pbTargetMax = pbTarget + cbTarget;

  0197e	8b 45 10	 mov	 eax, DWORD PTR _cbTarget$[ebp]
  01981	8b 55 0c	 mov	 edx, DWORD PTR _pbPattern$[ebp]
  01984	53		 push	 ebx

; 5817 : 	register unsigned long ulHashPattern;
; 5818 : 	register unsigned long ulHashTarget;
; 5819 : 	signed long count;
; 5820 : 	signed long countSTATIC;
; 5821 : 
; 5822 : 	unsigned char SINGLET;
; 5823 : 	unsigned long Quadruplet2nd;
; 5824 : 	unsigned long Quadruplet3rd;
; 5825 : 	unsigned long Quadruplet4th;
; 5826 : 
; 5827 : 	unsigned long  AdvanceHopperGrass;
; 5828 : 
; 5829 : 	long i; //BMH needed
; 5830 : 	int a, j;
; 5831 : 	unsigned int bm_bc[256]; //BMH needed
; 5832 : 	unsigned int bm_bc2nd[256]; //BMS needed
; 5833 : 	unsigned char bm_Horspool_Order2[256*256]; //BMHSS(Elsiane) needed, 'char' limits patterns to 255, if 'long' then table becomes 256KB, grrr.
; 5834 : 	unsigned long Gulliver; // or unsigned char or unsigned short
; 5835 : 
; 5836 : 	if (cbPattern > cbTarget)

  01985	8b 5d 14	 mov	 ebx, DWORD PTR _cbPattern$[ebp]
  01988	56		 push	 esi
  01989	8b 75 08	 mov	 esi, DWORD PTR _pbTarget$[ebp]
  0198c	57		 push	 edi
  0198d	8d 3c 06	 lea	 edi, DWORD PTR [esi+eax]
  01990	89 54 24 10	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+67640], edx
  01994	89 7c 24 18	 mov	 DWORD PTR _pbTargetMax$[esp+67640], edi
  01998	3b d8		 cmp	 ebx, eax

; 5837 : 		return(NULL);

  0199a	77 4d		 ja	 SHORT $LN1@Railgun_Qu@7

; 5838 : 
; 5839 : 	if ( cbPattern<4) { 

  0199c	83 fb 04	 cmp	 ebx, 4
  0199f	0f 83 c6 00 00
	00		 jae	 $LN69@Railgun_Qu@7

; 5840 : 		pbTarget = pbTarget+cbPattern;
; 5841 : 		ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  019a5	0f be 02	 movsx	 eax, BYTE PTR [edx]
  019a8	0f be 4c 1a ff	 movsx	 ecx, BYTE PTR [edx+ebx-1]
  019ad	c1 e0 08	 shl	 eax, 8
  019b0	03 f3		 add	 esi, ebx
  019b2	03 c8		 add	 ecx, eax

; 5842 : 
; 5843 : 		if ( cbPattern==3) {

  019b4	83 fb 03	 cmp	 ebx, 3
  019b7	75 5f		 jne	 SHORT $LN74@Railgun_Qu@7
  019b9	8d a4 24 00 00
	00 00		 npad	 7
$LL67@Railgun_Qu@7:

; 5844 : 			for ( ;; ) {
; 5845 : 				if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  019c0	0f be 46 fd	 movsx	 eax, BYTE PTR [esi-3]
  019c4	0f be 5e ff	 movsx	 ebx, BYTE PTR [esi-1]
  019c8	c1 e0 08	 shl	 eax, 8
  019cb	03 c3		 add	 eax, ebx
  019cd	3b c8		 cmp	 ecx, eax
  019cf	75 08		 jne	 SHORT $LN64@Railgun_Qu@7

; 5846 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  019d1	8a 42 01	 mov	 al, BYTE PTR [edx+1]
  019d4	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  019d7	74 27		 je	 SHORT $LN87@Railgun_Qu@7
$LN64@Railgun_Qu@7:

; 5847 : 				}
; 5848 : 				if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  019d9	8b c1		 mov	 eax, ecx
  019db	c1 e8 08	 shr	 eax, 8
  019de	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  019e1	74 01		 je	 SHORT $LN63@Railgun_Qu@7
  019e3	46		 inc	 esi
$LN63@Railgun_Qu@7:

; 5849 : 				pbTarget++;

  019e4	46		 inc	 esi

; 5850 : 				if (pbTarget > pbTargetMax)

  019e5	3b f7		 cmp	 esi, edi
  019e7	76 d7		 jbe	 SHORT $LL67@Railgun_Qu@7
$LN1@Railgun_Qu@7:

; 5984 : 				}
; 5985 : 				AdvanceHopperGrass++;
; 5986 : 			}
; 5987 : 
; 5988 : 			//GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);
; 5989 : 			//GlobalI += AdvanceHopperGrass;
; 5990 : 			//printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);
; 5991 : 		
; 5992 : 			return(NULL);

  019e9	33 c0		 xor	 eax, eax

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  019eb	5f		 pop	 edi
  019ec	5e		 pop	 esi
  019ed	5b		 pop	 ebx
  019ee	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  019f5	33 cc		 xor	 ecx, esp
  019f7	e8 00 00 00 00	 call	 @__security_check_cookie@4
  019fc	8b e5		 mov	 esp, ebp
  019fe	5d		 pop	 ebp
  019ff	c3		 ret	 0
$LN87@Railgun_Qu@7:

; 5846 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  01a00	8d 46 fd	 lea	 eax, DWORD PTR [esi-3]

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  01a03	5f		 pop	 edi
  01a04	5e		 pop	 esi
  01a05	5b		 pop	 ebx
  01a06	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01a0d	33 cc		 xor	 ecx, esp
  01a0f	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01a14	8b e5		 mov	 esp, ebp
  01a16	5d		 pop	 ebp
  01a17	c3		 ret	 0
$LN74@Railgun_Qu@7:

; 5851 : 					return(NULL);
; 5852 : 			}
; 5853 : 		} else {
; 5854 : 		}
; 5855 : 		for ( ;; ) {
; 5856 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  01a18	8a 46 ff	 mov	 al, BYTE PTR [esi-1]
  01a1b	0f be 56 fe	 movsx	 edx, BYTE PTR [esi-2]
  01a1f	0f be d8	 movsx	 ebx, al
  01a22	c1 e2 08	 shl	 edx, 8
  01a25	03 d3		 add	 edx, ebx
  01a27	3b ca		 cmp	 ecx, edx
  01a29	74 28		 je	 SHORT $LN89@Railgun_Qu@7
  01a2b	8b d1		 mov	 edx, ecx
  01a2d	c1 ea 08	 shr	 edx, 8
  01a30	eb 04		 jmp	 SHORT $LN60@Railgun_Qu@7
$LL120@Railgun_Qu@7:
  01a32	8b 7c 24 18	 mov	 edi, DWORD PTR _pbTargetMax$[esp+67640]
$LN60@Railgun_Qu@7:

; 5858 : 			if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  01a36	3a d0		 cmp	 dl, al
  01a38	74 01		 je	 SHORT $LN57@Railgun_Qu@7
  01a3a	46		 inc	 esi
$LN57@Railgun_Qu@7:

; 5859 : 			pbTarget++;

  01a3b	46		 inc	 esi

; 5860 : 			if (pbTarget > pbTargetMax)

  01a3c	3b f7		 cmp	 esi, edi
  01a3e	77 a9		 ja	 SHORT $LN1@Railgun_Qu@7

; 5851 : 					return(NULL);
; 5852 : 			}
; 5853 : 		} else {
; 5854 : 		}
; 5855 : 		for ( ;; ) {
; 5856 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  01a40	8a 46 ff	 mov	 al, BYTE PTR [esi-1]
  01a43	0f be 7e fe	 movsx	 edi, BYTE PTR [esi-2]
  01a47	0f be d8	 movsx	 ebx, al
  01a4a	c1 e7 08	 shl	 edi, 8
  01a4d	03 fb		 add	 edi, ebx
  01a4f	3b cf		 cmp	 ecx, edi
  01a51	75 df		 jne	 SHORT $LL120@Railgun_Qu@7
$LN89@Railgun_Qu@7:

; 5857 : 				return((pbTarget-2));

  01a53	8d 46 fe	 lea	 eax, DWORD PTR [esi-2]

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  01a56	5f		 pop	 edi
  01a57	5e		 pop	 esi
  01a58	5b		 pop	 ebx
  01a59	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01a60	33 cc		 xor	 ecx, esp
  01a62	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01a67	8b e5		 mov	 esp, ebp
  01a69	5d		 pop	 ebp
  01a6a	c3		 ret	 0
$LN69@Railgun_Qu@7:

; 5861 : 				return(NULL);
; 5862 : 		}
; 5863 : 	} else { //if ( cbPattern<4)
; 5864 : 		if (cbTarget<961) { // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  01a6b	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H
  01a70	0f 83 01 01 00
	00		 jae	 $LN54@Railgun_Qu@7

; 5865 : 
; 5866 : 			pbTarget = pbTarget+cbPattern;
; 5867 : 			ulHashPattern = *(unsigned long *)(pbPattern);

  01a76	8b 02		 mov	 eax, DWORD PTR [edx]
  01a78	89 44 24 20	 mov	 DWORD PTR _ulHashPattern$[esp+67640], eax

; 5868 : 
; 5869 : 			SINGLET = ulHashPattern & 0xFF;
; 5870 : 			Quadruplet2nd = SINGLET<<8;

  01a7c	0f b6 c0	 movzx	 eax, al
  01a7f	8b c8		 mov	 ecx, eax
  01a81	c1 e1 08	 shl	 ecx, 8
  01a84	89 4c 24 28	 mov	 DWORD PTR _Quadruplet2nd$[esp+67640], ecx

; 5871 : 			Quadruplet3rd = SINGLET<<16;

  01a88	8b c8		 mov	 ecx, eax
  01a8a	03 f3		 add	 esi, ebx
  01a8c	c1 e1 10	 shl	 ecx, 16			; 00000010H
  01a8f	89 44 24 1c	 mov	 DWORD PTR tv786[esp+67640], eax

; 5872 : 			Quadruplet4th = SINGLET<<24;

  01a93	c1 e0 18	 shl	 eax, 24			; 00000018H
  01a96	89 75 08	 mov	 DWORD PTR _pbTarget$[ebp], esi
  01a99	89 4c 24 24	 mov	 DWORD PTR _Quadruplet3rd$[esp+67640], ecx
  01a9d	89 44 24 2c	 mov	 DWORD PTR _Quadruplet4th$[esp+67640], eax
$LL53@Railgun_Qu@7:

; 5873 : 
; 5874 : 			for ( ;; ) {
; 5875 : 				AdvanceHopperGrass = 0;
; 5876 : 				ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  01aa1	8b c6		 mov	 eax, esi
  01aa3	2b c3		 sub	 eax, ebx
  01aa5	8b 00		 mov	 eax, DWORD PTR [eax]
  01aa7	33 ff		 xor	 edi, edi
  01aa9	89 7c 24 0c	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], edi

; 5877 : 
; 5878 : 			        if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  01aad	39 44 24 20	 cmp	 DWORD PTR _ulHashPattern$[esp+67640], eax
  01ab1	75 62		 jne	 SHORT $LN51@Railgun_Qu@7

; 5879 : 					count = cbPattern-1;

  01ab3	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 5880 : 					while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  01ab6	85 c0		 test	 eax, eax
  01ab8	74 38		 je	 SHORT $LN107@Railgun_Qu@7

; 5879 : 					count = cbPattern-1;

  01aba	8b ca		 mov	 ecx, edx
  01abc	8b fe		 mov	 edi, esi
  01abe	2b c8		 sub	 ecx, eax
  01ac0	2b f8		 sub	 edi, eax
  01ac2	03 cb		 add	 ecx, ebx
$LL50@Railgun_Qu@7:

; 5880 : 					while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  01ac4	8a 17		 mov	 dl, BYTE PTR [edi]
  01ac6	88 54 24 17	 mov	 BYTE PTR tv931[esp+67640], dl
  01aca	38 11		 cmp	 BYTE PTR [ecx], dl
  01acc	75 3d		 jne	 SHORT $LN49@Railgun_Qu@7

; 5881 : 						if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  01ace	8b 74 24 0c	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  01ad2	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]
  01ad5	03 f0		 add	 esi, eax
  01ad7	3b d6		 cmp	 edx, esi
  01ad9	75 0f		 jne	 SHORT $LN48@Railgun_Qu@7
  01adb	0f be 54 24 17	 movsx	 edx, BYTE PTR tv931[esp+67640]
  01ae0	39 54 24 1c	 cmp	 DWORD PTR tv786[esp+67640], edx
  01ae4	74 04		 je	 SHORT $LN48@Railgun_Qu@7
  01ae6	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+67640]
$LN48@Railgun_Qu@7:

; 5880 : 					while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  01aea	8b 75 08	 mov	 esi, DWORD PTR _pbTarget$[ebp]

; 5882 : 						count--;

  01aed	41		 inc	 ecx
  01aee	47		 inc	 edi
  01aef	48		 dec	 eax
  01af0	75 d2		 jne	 SHORT $LL50@Railgun_Qu@7
$LN107@Railgun_Qu@7:

; 5883 : 					}
; 5884 : 					if ( count == 0) return((pbTarget-cbPattern));

  01af2	8b c6		 mov	 eax, esi
  01af4	2b c3		 sub	 eax, ebx

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  01af6	5f		 pop	 edi
  01af7	5e		 pop	 esi
  01af8	5b		 pop	 ebx
  01af9	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01b00	33 cc		 xor	 ecx, esp
  01b02	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01b07	8b e5		 mov	 esp, ebp
  01b09	5d		 pop	 ebp
  01b0a	c3		 ret	 0
$LN49@Railgun_Qu@7:

; 5883 : 					}
; 5884 : 					if ( count == 0) return((pbTarget-cbPattern));

  01b0b	85 c0		 test	 eax, eax
  01b0d	74 e3		 je	 SHORT $LN107@Railgun_Qu@7

; 5885 : 			        } else { // The goal here: to avoid memory accesses by stressing the registers.

  01b0f	8b 7c 24 0c	 mov	 edi, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  01b13	eb 36		 jmp	 SHORT $LN119@Railgun_Qu@7
$LN51@Railgun_Qu@7:

; 5886 : 					if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  01b15	8b c8		 mov	 ecx, eax
  01b17	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  01b1d	39 4c 24 28	 cmp	 DWORD PTR _Quadruplet2nd$[esp+67640], ecx
  01b21	74 28		 je	 SHORT $LN119@Railgun_Qu@7

; 5887 : 						AdvanceHopperGrass++;
; 5888 : 						if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  01b23	8b d0		 mov	 edx, eax
  01b25	81 e2 00 00 ff
	00		 and	 edx, 16711680		; 00ff0000H
  01b2b	bf 01 00 00 00	 mov	 edi, 1
  01b30	39 54 24 24	 cmp	 DWORD PTR _Quadruplet3rd$[esp+67640], edx
  01b34	74 15		 je	 SHORT $LN119@Railgun_Qu@7

; 5889 : 							AdvanceHopperGrass++;
; 5890 : 							if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  01b36	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  01b3b	bf 02 00 00 00	 mov	 edi, 2
  01b40	39 44 24 2c	 cmp	 DWORD PTR _Quadruplet4th$[esp+67640], eax
  01b44	74 05		 je	 SHORT $LN119@Railgun_Qu@7
  01b46	bf 03 00 00 00	 mov	 edi, 3
$LN119@Railgun_Qu@7:
  01b4b	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]

; 5891 : 						}
; 5892 : 					}
; 5893 : 				}
; 5894 : 
; 5895 : 				AdvanceHopperGrass++;
; 5896 : 
; 5897 : 				pbTarget = pbTarget + AdvanceHopperGrass;

  01b4f	8d 74 3e 01	 lea	 esi, DWORD PTR [esi+edi+1]
  01b53	89 75 08	 mov	 DWORD PTR _pbTarget$[ebp], esi

; 5898 : 				if (pbTarget > pbTargetMax)

  01b56	3b 74 24 18	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+67640]
  01b5a	0f 86 41 ff ff
	ff		 jbe	 $LL53@Railgun_Qu@7

; 5984 : 				}
; 5985 : 				AdvanceHopperGrass++;
; 5986 : 			}
; 5987 : 
; 5988 : 			//GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);
; 5989 : 			//GlobalI += AdvanceHopperGrass;
; 5990 : 			//printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);
; 5991 : 		
; 5992 : 			return(NULL);

  01b60	33 c0		 xor	 eax, eax

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  01b62	5f		 pop	 edi
  01b63	5e		 pop	 esi
  01b64	5b		 pop	 ebx
  01b65	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01b6c	33 cc		 xor	 ecx, esp
  01b6e	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01b73	8b e5		 mov	 esp, ebp
  01b75	5d		 pop	 ebp
  01b76	c3		 ret	 0
$LN54@Railgun_Qu@7:

; 5899 : 					return(NULL);
; 5900 : 			}
; 5901 : 
; 5902 : 		} else { //if (cbTarget<961)
; 5903 : 			countSTATIC = cbPattern-2-2;

  01b77	8d 43 fc	 lea	 eax, DWORD PTR [ebx-4]
  01b7a	89 44 24 18	 mov	 DWORD PTR _countSTATIC$[esp+67640], eax
  01b7e	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]

; 5904 : 
; 5905 : 			for (a=0; a < 256; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern+1;}

  01b81	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  01b86	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc2nd$[esp+67640]
  01b8a	f3 ab		 rep stosd
  01b8c	8b c3		 mov	 eax, ebx
  01b8e	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  01b93	8d bc 24 30 04
	00 00		 lea	 edi, DWORD PTR _bm_bc$[esp+67640]
  01b9a	f3 ab		 rep stosd

; 5906 : 			for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 

  01b9c	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  01b9f	33 c0		 xor	 eax, eax
  01ba1	85 c9		 test	 ecx, ecx
  01ba3	74 18		 je	 SHORT $LN35@Railgun_Qu@7
$LL37@Railgun_Qu@7:
  01ba5	0f be 3c 02	 movsx	 edi, BYTE PTR [edx+eax]
  01ba9	8b cb		 mov	 ecx, ebx
  01bab	2b c8		 sub	 ecx, eax
  01bad	49		 dec	 ecx
  01bae	89 8c bc 30 04
	00 00		 mov	 DWORD PTR _bm_bc$[esp+edi*4+67640], ecx
  01bb5	40		 inc	 eax
  01bb6	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  01bb9	3b c1		 cmp	 eax, ecx
  01bbb	72 e8		 jb	 SHORT $LL37@Railgun_Qu@7
$LN35@Railgun_Qu@7:

; 5907 : 			for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=cbPattern-j; 

  01bbd	33 c0		 xor	 eax, eax
  01bbf	85 db		 test	 ebx, ebx
  01bc1	74 11		 je	 SHORT $LN32@Railgun_Qu@7
$LL34@Railgun_Qu@7:
  01bc3	0f be 3c 02	 movsx	 edi, BYTE PTR [edx+eax]
  01bc7	8b cb		 mov	 ecx, ebx
  01bc9	2b c8		 sub	 ecx, eax
  01bcb	40		 inc	 eax
  01bcc	89 4c bc 30	 mov	 DWORD PTR _bm_bc2nd$[esp+edi*4+67640], ecx
  01bd0	3b c3		 cmp	 eax, ebx
  01bd2	72 ef		 jb	 SHORT $LL34@Railgun_Qu@7
$LN32@Railgun_Qu@7:
  01bd4	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]

; 5908 : 
; 5909 : 			// Elsiane r.2  [
; 5910 : 			for (a=0; a < 256*256; a++) {bm_Horspool_Order2[a]= cbPattern-1;} // 'memset' if not optimized

  01bd7	0f b6 c2	 movzx	 eax, dl
  01bda	68 00 00 01 00	 push	 65536			; 00010000H
  01bdf	50		 push	 eax
  01be0	8d 8c 24 38 08
	00 00		 lea	 ecx, DWORD PTR _bm_Horspool_Order2$[esp+67648]
  01be7	51		 push	 ecx
  01be8	e8 00 00 00 00	 call	 _memset

; 5911 : 
; 5912 : 			// alfalfa 7 long 6 BBs (al lf fa al lf fa) 3 distinct BBs (al lf fa) 
; 5913 : 			// fast 4 0-1-2 fa as st
; 5914 : 			for (j=0; j < cbPattern-1; j++) bm_Horspool_Order2[*(unsigned short *)(pbPattern+j)]=j; // Rightmost appearance/position is needed

  01bed	8b 54 24 1c	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67652]
  01bf1	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  01bf4	83 c4 0c	 add	 esp, 12			; 0000000cH
  01bf7	33 c0		 xor	 eax, eax
  01bf9	85 c9		 test	 ecx, ecx
  01bfb	74 13		 je	 SHORT $LN26@Railgun_Qu@7
  01bfd	8d 49 00	 npad	 3
$LL28@Railgun_Qu@7:
  01c00	0f b7 3c 02	 movzx	 edi, WORD PTR [edx+eax]
  01c04	88 84 3c 30 08
	00 00		 mov	 BYTE PTR _bm_Horspool_Order2$[esp+edi+67640], al
  01c0b	40		 inc	 eax
  01c0c	3b c1		 cmp	 eax, ecx
  01c0e	72 f0		 jb	 SHORT $LL28@Railgun_Qu@7
$LN26@Railgun_Qu@7:

; 5915 : 
; 5916 : 			// Elsiane r.2 ]
; 5917 : 
; 5918 : 			ulHashPattern = *(unsigned long *)(pbPattern); // First four bytes

  01c10	8b 02		 mov	 eax, DWORD PTR [edx]
  01c12	89 44 24 20	 mov	 DWORD PTR _ulHashPattern$[esp+67640], eax

; 5919 : 			//ulHashTarget = *(unsigned short *)(pbPattern+cbPattern-1-1); // Last two bytes
; 5920 : 		
; 5921 : 			AdvanceHopperGrass = 0;
; 5922 : 			i=0;

  01c16	33 c0		 xor	 eax, eax

; 5923 : 	if ( cbPattern>10) { // r.2

  01c18	83 fb 0a	 cmp	 ebx, 10			; 0000000aH
  01c1b	0f 86 05 01 00
	00		 jbe	 $LN84@Railgun_Qu@7

; 5924 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  01c21	8b 4d 10	 mov	 ecx, DWORD PTR _cbTarget$[ebp]
  01c24	2b cb		 sub	 ecx, ebx
  01c26	89 4c 24 1c	 mov	 DWORD PTR tv662[esp+67640], ecx
  01c2a	8d 0c 1e	 lea	 ecx, DWORD PTR [esi+ebx]
  01c2d	8d 49 00	 npad	 3
$LL24@Railgun_Qu@7:

; 5925 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];

  01c30	0f b7 54 01 fe	 movzx	 edx, WORD PTR [ecx+eax-2]
  01c35	0f b6 94 14 30
	08 00 00	 movzx	 edx, BYTE PTR _bm_Horspool_Order2$[esp+edx+67640]

; 5926 : 
; 5927 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found

  01c3d	8d 7b fe	 lea	 edi, DWORD PTR [ebx-2]
  01c40	3b d7		 cmp	 edx, edi
  01c42	75 6c		 jne	 SHORT $LN22@Railgun_Qu@7

; 5928 : 					if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  01c44	8b 4c 24 20	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+67640]
  01c48	39 0c 30	 cmp	 DWORD PTR [eax+esi], ecx
  01c4b	75 44		 jne	 SHORT $LN18@Railgun_Qu@7

; 5929 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  01c4d	8b 7c 24 18	 mov	 edi, DWORD PTR _countSTATIC$[esp+67640]

; 5930 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  01c51	85 ff		 test	 edi, edi
  01c53	74 21		 je	 SHORT $LN93@Railgun_Qu@7

; 5929 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  01c55	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  01c59	83 c2 04	 add	 edx, 4
  01c5c	89 54 24 0c	 mov	 DWORD PTR tv1098[esp+67640], edx
  01c60	8d 4c 30 04	 lea	 ecx, DWORD PTR [eax+esi+4]
$LL20@Railgun_Qu@7:

; 5930 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  01c64	8b 54 24 0c	 mov	 edx, DWORD PTR tv1098[esp+67640]
  01c68	8a 12		 mov	 dl, BYTE PTR [edx]
  01c6a	3a 11		 cmp	 dl, BYTE PTR [ecx]
  01c6c	75 1f		 jne	 SHORT $LN19@Railgun_Qu@7

; 5931 : 							count--;

  01c6e	ff 44 24 0c	 inc	 DWORD PTR tv1098[esp+67640]
  01c72	41		 inc	 ecx
  01c73	4f		 dec	 edi
  01c74	75 ee		 jne	 SHORT $LL20@Railgun_Qu@7
$LN93@Railgun_Qu@7:

; 5932 : 						if ( count == 0) return(pbTarget+i);

  01c76	03 c6		 add	 eax, esi

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  01c78	5f		 pop	 edi
  01c79	5e		 pop	 esi
  01c7a	5b		 pop	 ebx
  01c7b	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01c82	33 cc		 xor	 ecx, esp
  01c84	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01c89	8b e5		 mov	 esp, ebp
  01c8b	5d		 pop	 ebp
  01c8c	c3		 ret	 0
$LN19@Railgun_Qu@7:

; 5932 : 						if ( count == 0) return(pbTarget+i);

  01c8d	85 ff		 test	 edi, edi
  01c8f	74 e5		 je	 SHORT $LN93@Railgun_Qu@7
$LN18@Railgun_Qu@7:

; 5933 : 					}
; 5934 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 5935 : // r.2 [
; 5936 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )

  01c91	8d 0c 1e	 lea	 ecx, DWORD PTR [esi+ebx]
  01c94	0f b6 54 01 ff	 movzx	 edx, BYTE PTR [ecx+eax-1]
  01c99	0f b6 3c 01	 movzx	 edi, BYTE PTR [ecx+eax]
  01c9d	8b 94 94 30 04
	00 00		 mov	 edx, DWORD PTR _bm_bc$[esp+edx*4+67640]
  01ca4	8b 7c bc 30	 mov	 edi, DWORD PTR _bm_bc2nd$[esp+edi*4+67640]
  01ca8	3b d7		 cmp	 edx, edi
  01caa	73 0b		 jae	 SHORT $LN17@Railgun_Qu@7

; 5937 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  01cac	03 c7		 add	 eax, edi

; 5938 : else

  01cae	eb 13		 jmp	 SHORT $LN13@Railgun_Qu@7
$LN22@Railgun_Qu@7:

; 5939 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 5940 : // r.2 ]
; 5941 : 				} else if ( Gulliver == cbPattern-1 ) // CASE #2: means the pair (char order 2) is not found

  01cb0	8d 7b ff	 lea	 edi, DWORD PTR [ebx-1]
  01cb3	3b d7		 cmp	 edx, edi
  01cb5	75 04		 jne	 SHORT $LN14@Railgun_Qu@7
$LN17@Railgun_Qu@7:

; 5942 : 					i = i + Gulliver; // the pair is not found, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2

  01cb7	03 c2		 add	 eax, edx

; 5943 : 				else

  01cb9	eb 08		 jmp	 SHORT $LN13@Railgun_Qu@7
$LN14@Railgun_Qu@7:

; 5944 : 					i = i +  cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position

  01cbb	8b fb		 mov	 edi, ebx
  01cbd	2b fa		 sub	 edi, edx
  01cbf	8d 44 38 fe	 lea	 eax, DWORD PTR [eax+edi-2]
$LN13@Railgun_Qu@7:

; 5924 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  01cc3	8b 7c 24 1c	 mov	 edi, DWORD PTR tv662[esp+67640]
  01cc7	8d 57 ff	 lea	 edx, DWORD PTR [edi-1]
  01cca	3b c2		 cmp	 eax, edx
  01ccc	0f 86 5e ff ff
	ff		 jbe	 $LL24@Railgun_Qu@7

; 5945 : 
; 5946 : // 32323218 Order 1 Horspool
; 5947 : // fa af fa af fa as st Order 2 Horspool
; 5948 : //  0  1  2  3  4  5  6
; 5949 : // HIKARIfast
; 5950 : // fafafast
; 5951 : //   fafafast +2 Order 1 'a' vs 't'
; 5952 : //   fafafast +2 = (cbPattern-Gulliver-2 = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 5953 : 
; 5954 : // 76543218 Order 1 Horspool
; 5955 : // lo on ng gp pa ac ce Order 2 Horspool
; 5956 : //  0  1  2  3  4  5  6
; 5957 : // HIKARIfast
; 5958 : // longpace
; 5959 : //   longpace +2 Order 1 'a' vs 'e'
; 5960 : //        longpace +7 = (cbPattern-1 = 8-1 = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 5961 : 
; 5962 : 				AdvanceHopperGrass++;
; 5963 : 			}
; 5964 : 	} else { // r.2
; 5965 : 			while (i <= cbTarget-cbPattern-1) {

  01cd2	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
$LN10@Railgun_Qu@7:

; 5974 : 				AdvanceHopperGrass++;
; 5975 : 			}
; 5976 : 	} // r.2
; 5977 : 
; 5978 : 			if (i == cbTarget-cbPattern) {

  01cd6	3b c7		 cmp	 eax, edi
  01cd8	0f 85 0b fd ff
	ff		 jne	 $LN1@Railgun_Qu@7

; 5979 : 				if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  01cde	03 f0		 add	 esi, eax
  01ce0	8b 44 24 20	 mov	 eax, DWORD PTR _ulHashPattern$[esp+67640]
  01ce4	39 06		 cmp	 DWORD PTR [esi], eax
  01ce6	0f 85 fd fc ff
	ff		 jne	 $LN1@Railgun_Qu@7

; 5980 : 					count = countSTATIC;

  01cec	8b 4c 24 18	 mov	 ecx, DWORD PTR _countSTATIC$[esp+67640]

; 5981 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  01cf0	85 c9		 test	 ecx, ecx
  01cf2	0f 84 b0 00 00
	00		 je	 $LN106@Railgun_Qu@7

; 5980 : 					count = countSTATIC;

  01cf8	8d 7a 04	 lea	 edi, DWORD PTR [edx+4]
  01cfb	8d 56 04	 lea	 edx, DWORD PTR [esi+4]
  01cfe	8b ff		 npad	 2
$LL3@Railgun_Qu@7:

; 5981 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  01d00	8a 07		 mov	 al, BYTE PTR [edi]
  01d02	3a 02		 cmp	 al, BYTE PTR [edx]
  01d04	0f 85 96 00 00
	00		 jne	 $LN2@Railgun_Qu@7

; 5982 : 						count--;

  01d0a	42		 inc	 edx
  01d0b	47		 inc	 edi
  01d0c	49		 dec	 ecx
  01d0d	75 f1		 jne	 SHORT $LL3@Railgun_Qu@7

; 5983 : 					if ( count == 0) return(pbTarget+i);

  01d0f	8b c6		 mov	 eax, esi

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  01d11	5f		 pop	 edi
  01d12	5e		 pop	 esi
  01d13	5b		 pop	 ebx
  01d14	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01d1b	33 cc		 xor	 ecx, esp
  01d1d	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01d22	8b e5		 mov	 esp, ebp
  01d24	5d		 pop	 ebp
  01d25	c3		 ret	 0
$LN84@Railgun_Qu@7:

; 5945 : 
; 5946 : // 32323218 Order 1 Horspool
; 5947 : // fa af fa af fa as st Order 2 Horspool
; 5948 : //  0  1  2  3  4  5  6
; 5949 : // HIKARIfast
; 5950 : // fafafast
; 5951 : //   fafafast +2 Order 1 'a' vs 't'
; 5952 : //   fafafast +2 = (cbPattern-Gulliver-2 = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 5953 : 
; 5954 : // 76543218 Order 1 Horspool
; 5955 : // lo on ng gp pa ac ce Order 2 Horspool
; 5956 : //  0  1  2  3  4  5  6
; 5957 : // HIKARIfast
; 5958 : // longpace
; 5959 : //   longpace +2 Order 1 'a' vs 'e'
; 5960 : //        longpace +7 = (cbPattern-1 = 8-1 = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 5961 : 
; 5962 : 				AdvanceHopperGrass++;
; 5963 : 			}
; 5964 : 	} else { // r.2
; 5965 : 			while (i <= cbTarget-cbPattern-1) {

  01d26	8b 7d 10	 mov	 edi, DWORD PTR _cbTarget$[ebp]
  01d29	2b fb		 sub	 edi, ebx
  01d2b	89 7c 24 1c	 mov	 DWORD PTR tv662[esp+67640], edi
  01d2f	90		 npad	 1
$LL11@Railgun_Qu@7:

; 5966 : 				if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  01d30	8b 4c 24 20	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+67640]
  01d34	39 0c 30	 cmp	 DWORD PTR [eax+esi], ecx
  01d37	75 50		 jne	 SHORT $LN6@Railgun_Qu@7

; 5967 : 					count = countSTATIC;

  01d39	8b 7c 24 18	 mov	 edi, DWORD PTR _countSTATIC$[esp+67640]

; 5968 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  01d3d	85 ff		 test	 edi, edi
  01d3f	0f 84 31 ff ff
	ff		 je	 $LN93@Railgun_Qu@7

; 5967 : 					count = countSTATIC;

  01d45	83 c2 04	 add	 edx, 4
  01d48	89 54 24 0c	 mov	 DWORD PTR tv1191[esp+67640], edx
  01d4c	8d 4c 30 04	 lea	 ecx, DWORD PTR [eax+esi+4]
$LL8@Railgun_Qu@7:

; 5968 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  01d50	8b 54 24 0c	 mov	 edx, DWORD PTR tv1191[esp+67640]
  01d54	8a 12		 mov	 dl, BYTE PTR [edx]
  01d56	3a 11		 cmp	 dl, BYTE PTR [ecx]
  01d58	75 1f		 jne	 SHORT $LN7@Railgun_Qu@7

; 5969 : 						count--;

  01d5a	ff 44 24 0c	 inc	 DWORD PTR tv1191[esp+67640]
  01d5e	41		 inc	 ecx
  01d5f	4f		 dec	 edi
  01d60	75 ee		 jne	 SHORT $LL8@Railgun_Qu@7

; 5932 : 						if ( count == 0) return(pbTarget+i);

  01d62	03 c6		 add	 eax, esi

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  01d64	5f		 pop	 edi
  01d65	5e		 pop	 esi
  01d66	5b		 pop	 ebx
  01d67	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01d6e	33 cc		 xor	 ecx, esp
  01d70	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01d75	8b e5		 mov	 esp, ebp
  01d77	5d		 pop	 ebp
  01d78	c3		 ret	 0
$LN7@Railgun_Qu@7:

; 5970 : 					}
; 5971 : 					if ( count == 0) return(pbTarget+i);

  01d79	85 ff		 test	 edi, edi
  01d7b	0f 84 f5 fe ff
	ff		 je	 $LN93@Railgun_Qu@7
  01d81	8b 7c 24 1c	 mov	 edi, DWORD PTR tv662[esp+67640]
  01d85	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
$LN6@Railgun_Qu@7:

; 5972 : 				}
; 5973 : 				i= i + bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  01d89	8d 0c 30	 lea	 ecx, DWORD PTR [eax+esi]
  01d8c	0f b6 0c 19	 movzx	 ecx, BYTE PTR [ecx+ebx]
  01d90	03 44 8c 30	 add	 eax, DWORD PTR _bm_bc2nd$[esp+ecx*4+67640]
  01d94	8d 4f ff	 lea	 ecx, DWORD PTR [edi-1]
  01d97	3b c1		 cmp	 eax, ecx
  01d99	76 95		 jbe	 SHORT $LL11@Railgun_Qu@7

; 5945 : 
; 5946 : // 32323218 Order 1 Horspool
; 5947 : // fa af fa af fa as st Order 2 Horspool
; 5948 : //  0  1  2  3  4  5  6
; 5949 : // HIKARIfast
; 5950 : // fafafast
; 5951 : //   fafafast +2 Order 1 'a' vs 't'
; 5952 : //   fafafast +2 = (cbPattern-Gulliver-2 = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 5953 : 
; 5954 : // 76543218 Order 1 Horspool
; 5955 : // lo on ng gp pa ac ce Order 2 Horspool
; 5956 : //  0  1  2  3  4  5  6
; 5957 : // HIKARIfast
; 5958 : // longpace
; 5959 : //   longpace +2 Order 1 'a' vs 'e'
; 5960 : //        longpace +7 = (cbPattern-1 = 8-1 = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 5961 : 
; 5962 : 				AdvanceHopperGrass++;
; 5963 : 			}
; 5964 : 	} else { // r.2
; 5965 : 			while (i <= cbTarget-cbPattern-1) {

  01d9b	e9 36 ff ff ff	 jmp	 $LN10@Railgun_Qu@7
$LN2@Railgun_Qu@7:

; 5983 : 					if ( count == 0) return(pbTarget+i);

  01da0	85 c9		 test	 ecx, ecx
  01da2	0f 85 41 fc ff
	ff		 jne	 $LN1@Railgun_Qu@7
$LN106@Railgun_Qu@7:

; 5993 : 		} //if (cbTarget<961)
; 5994 : 	} //if ( cbPattern<4)
; 5995 : }

  01da8	8b 8c 24 34 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67640]
  01daf	5f		 pop	 edi
  01db0	8b c6		 mov	 eax, esi
  01db2	5e		 pop	 esi
  01db3	5b		 pop	 ebx
  01db4	33 cc		 xor	 ecx, esp
  01db6	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01dbb	8b e5		 mov	 esp, ebp
  01dbd	5d		 pop	 ebp
  01dbe	c3		 ret	 0
_Railgun_Quadruplet_7Gulliver ENDP
_TEXT	ENDS
PUBLIC	__real@4059000000000000
PUBLIC	__real@41f0000000000000
PUBLIC	_cbTarget$GSCopy$
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7Gulliver_count_hits
EXTRN	_printf:PROC
EXTRN	__fltused:DWORD
EXTRN	__ftol2_sse:PROC
;	COMDAT __real@4059000000000000
CONST	SEGMENT
__real@4059000000000000 DQ 04059000000000000r	; 100
CONST	ENDS
;	COMDAT __real@41f0000000000000
CONST	SEGMENT
__real@41f0000000000000 DQ 041f0000000000000r	; 4.29497e+009
; Function compile flags: /Ogtpy
CONST	ENDS
_TEXT	SEGMENT
_AdvanceHopperGrass$ = -67628				; size = 4
tv902 = -67621						; size = 1
_pbPattern$GSCopy$ = -67620				; size = 4
tv1069 = -67616						; size = 4
_pbTargetMax$ = -67616					; size = 4
tv1156 = -67612						; size = 4
tv1154 = -67612						; size = 4
tv630 = -67612						; size = 4
_Quadruplet4th$ = -67612				; size = 4
tv759 = -67608						; size = 4
_countSTATIC$ = -67608					; size = 4
_ulHashPattern$ = -67604				; size = 4
_cbTarget$GSCopy$ = -67600				; size = 4
_Quadruplet2nd$ = -67600				; size = 4
_Quadruplet3rd$ = -67596				; size = 4
_bm_bc$ = -67592					; size = 1024
_bm_bc2nd$ = -66568					; size = 1024
_bm_Horspool_Order2$ = -65544				; size = 65536
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7Gulliver_count_hits PROC

; 6073 : {

  01dc0	55		 push	 ebp
  01dc1	8b ec		 mov	 ebp, esp
  01dc3	83 e4 f8	 and	 esp, -8			; fffffff8H
  01dc6	b8 2c 08 01 00	 mov	 eax, 67628		; 0001082cH
  01dcb	e8 00 00 00 00	 call	 __chkstk
  01dd0	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  01dd5	33 c4		 xor	 eax, esp
  01dd7	89 84 24 28 08
	01 00		 mov	 DWORD PTR __$ArrayPad$[esp+67628], eax
  01dde	8b 45 10	 mov	 eax, DWORD PTR _cbTarget$[ebp]
  01de1	8b 55 0c	 mov	 edx, DWORD PTR _pbPattern$[ebp]
  01de4	53		 push	 ebx

; 6074 : 	char * pbTargetMax = pbTarget + cbTarget;
; 6075 : 	register unsigned long ulHashPattern;
; 6076 : 	register unsigned long ulHashTarget;
; 6077 : 	signed long count;
; 6078 : 	signed long countSTATIC;
; 6079 : 
; 6080 : 	unsigned char SINGLET;
; 6081 : 	unsigned long Quadruplet2nd;
; 6082 : 	unsigned long Quadruplet3rd;
; 6083 : 	unsigned long Quadruplet4th;
; 6084 : 
; 6085 : 	unsigned long  AdvanceHopperGrass;
; 6086 : 
; 6087 : 	long i; //BMH needed
; 6088 : 	int a, j;
; 6089 : 	unsigned int bm_bc[256]; //BMH needed
; 6090 : 	unsigned int bm_bc2nd[256]; //BMS needed
; 6091 : 	unsigned char bm_Horspool_Order2[256*256]; //BMHSS(Elsiane) needed, 'char' limits patterns to 255, if 'long' then table becomes 256KB, grrr.
; 6092 : 	unsigned long Gulliver; // or unsigned char or unsigned short
; 6093 : 
; 6094 : 	if (cbPattern > cbTarget)

  01de5	8b 5d 14	 mov	 ebx, DWORD PTR _cbPattern$[ebp]
  01de8	56		 push	 esi
  01de9	8b 75 08	 mov	 esi, DWORD PTR _pbTarget$[ebp]
  01dec	57		 push	 edi
  01ded	8d 3c 30	 lea	 edi, DWORD PTR [eax+esi]
  01df0	89 54 24 14	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+67640], edx

; 6254 : 					count = countSTATIC;

  01df4	89 44 24 28	 mov	 DWORD PTR _cbTarget$GSCopy$[esp+67640], eax
  01df8	89 7c 24 18	 mov	 DWORD PTR _pbTargetMax$[esp+67640], edi
  01dfc	3b d8		 cmp	 ebx, eax
  01dfe	0f 87 cb 03 00
	00		 ja	 $LN132@Railgun_Qu@8

; 6095 : 		return(NULL);
; 6096 : 
; 6097 : 	if ( cbPattern<4) { 

  01e04	83 fb 04	 cmp	 ebx, 4
  01e07	0f 83 9f 00 00
	00		 jae	 $LN60@Railgun_Qu@8

; 6098 : 		pbTarget = pbTarget+cbPattern;
; 6099 : 		ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  01e0d	0f be 0a	 movsx	 ecx, BYTE PTR [edx]
  01e10	0f be 44 1a ff	 movsx	 eax, BYTE PTR [edx+ebx-1]
  01e15	c1 e1 08	 shl	 ecx, 8
  01e18	03 c1		 add	 eax, ecx

; 6100 : 
; 6101 : 		if ( cbPattern==3) {

  01e1a	8b c8		 mov	 ecx, eax
  01e1c	03 f3		 add	 esi, ebx
  01e1e	c1 e9 08	 shr	 ecx, 8
  01e21	83 fb 03	 cmp	 ebx, 3
  01e24	75 4d		 jne	 SHORT $LL51@Railgun_Qu@8
  01e26	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL58@Railgun_Qu@8:

; 6102 : 			for ( ;; ) {
; 6103 : 				if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  01e30	0f be 7e fd	 movsx	 edi, BYTE PTR [esi-3]
  01e34	0f be 5e ff	 movsx	 ebx, BYTE PTR [esi-1]
  01e38	c1 e7 08	 shl	 edi, 8
  01e3b	03 fb		 add	 edi, ebx
  01e3d	3b c7		 cmp	 eax, edi
  01e3f	75 0e		 jne	 SHORT $LN55@Railgun_Qu@8

; 6104 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));

  01e41	8a 5a 01	 mov	 bl, BYTE PTR [edx+1]
  01e44	3a 5e fe	 cmp	 bl, BYTE PTR [esi-2]
  01e47	75 06		 jne	 SHORT $LN55@Railgun_Qu@8
  01e49	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN55@Railgun_Qu@8:

; 6105 : 				}
; 6106 : 				if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  01e4f	3a 4e fe	 cmp	 cl, BYTE PTR [esi-2]
  01e52	74 01		 je	 SHORT $LN54@Railgun_Qu@8
  01e54	46		 inc	 esi
$LN54@Railgun_Qu@8:

; 6107 : 				pbTarget++;

  01e55	46		 inc	 esi

; 6108 : 				if (pbTarget > pbTargetMax)

  01e56	3b 74 24 18	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+67640]
  01e5a	76 d4		 jbe	 SHORT $LL58@Railgun_Qu@8

; 6265 : 		
; 6266 : 			return(NULL);

  01e5c	33 c0		 xor	 eax, eax

; 6267 : 		} //if (cbTarget<961)
; 6268 : 	} //if ( cbPattern<4)
; 6269 : }

  01e5e	5f		 pop	 edi
  01e5f	5e		 pop	 esi
  01e60	5b		 pop	 ebx
  01e61	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01e68	33 cc		 xor	 ecx, esp
  01e6a	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01e6f	8b e5		 mov	 esp, ebp
  01e71	5d		 pop	 ebp
  01e72	c3		 ret	 0
$LL51@Railgun_Qu@8:

; 6109 : 					return(NULL);
; 6110 : 			}
; 6111 : 		} else {
; 6112 : 		}
; 6113 : 		for ( ;; ) {
; 6114 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  01e73	0f be 56 fe	 movsx	 edx, BYTE PTR [esi-2]
  01e77	0f be 5e ff	 movsx	 ebx, BYTE PTR [esi-1]
  01e7b	c1 e2 08	 shl	 edx, 8
  01e7e	03 d3		 add	 edx, ebx
  01e80	3b c2		 cmp	 eax, edx
  01e82	75 06		 jne	 SHORT $LN49@Railgun_Qu@8

; 6115 : 				Railgunhits++; //return((pbTarget-2));

  01e84	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN49@Railgun_Qu@8:

; 6116 : 			if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  01e8a	3a 4e ff	 cmp	 cl, BYTE PTR [esi-1]
  01e8d	74 01		 je	 SHORT $LN48@Railgun_Qu@8
  01e8f	46		 inc	 esi
$LN48@Railgun_Qu@8:

; 6117 : 			pbTarget++;

  01e90	46		 inc	 esi

; 6118 : 			if (pbTarget > pbTargetMax)

  01e91	3b f7		 cmp	 esi, edi
  01e93	76 de		 jbe	 SHORT $LL51@Railgun_Qu@8

; 6265 : 		
; 6266 : 			return(NULL);

  01e95	33 c0		 xor	 eax, eax

; 6267 : 		} //if (cbTarget<961)
; 6268 : 	} //if ( cbPattern<4)
; 6269 : }

  01e97	5f		 pop	 edi
  01e98	5e		 pop	 esi
  01e99	5b		 pop	 ebx
  01e9a	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01ea1	33 cc		 xor	 ecx, esp
  01ea3	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01ea8	8b e5		 mov	 esp, ebp
  01eaa	5d		 pop	 ebp
  01eab	c3		 ret	 0
$LN60@Railgun_Qu@8:

; 6119 : 				return(NULL);
; 6120 : 		}
; 6121 : 	} else { //if ( cbPattern<4)
; 6122 : 		if (cbTarget<961) { // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  01eac	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H
  01eb1	0f 83 12 01 00
	00		 jae	 $LN45@Railgun_Qu@8

; 6123 : /*
; 6124 : 			// A better strstr, with no asm code
; 6125 : 			// Written by Mischa Sandberg
; 6126 : 			// http://mischasan.wordpress.com
; 6127 : 			// static char const *
; 6128 : 			// scanstrm(char const *tgt, char const *pat, int len)
; 6129 : 			// {
; 6130 : 			//     uint32_t head = MSBF32(pat), wind = 0, next;
; 6131 : 			// 
; 6132 : 			//     pat += 4, len -= 4;
; 6133 : 			//     while ((next = *(uint8_t const*)tgt++)) {
; 6134 : 			//         wind = ( wind << 8 ) + next;
; 6135 : 			//         if (wind == head && !memcmp(tgt, pat, len))
; 6136 : 			//             return tgt - 4;
; 6137 : 			//     }
; 6138 : 			//     return  NULL;
; 6139 : 			//}
; 6140 : 			ulHashPattern = 0;
; 6141 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;
; 6142 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;
; 6143 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;
; 6144 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;
; 6145 : 			AdvanceHopperGrass = 0;
; 6146 : 			cbPattern -= 4;
; 6147 : 			while ((ulHashTarget = *(uint8_t const*)pbTarget++)) {
; 6148 : 				AdvanceHopperGrass = ( AdvanceHopperGrass << 8 ) + ulHashTarget;
; 6149 : 				if (AdvanceHopperGrass == ulHashPattern && !memcmp(pbTarget, pbPattern, cbPattern))
; 6150 : 				Railgunhits++; //return pbTarget - 4;
; 6151 : 			}
; 6152 : 			return  NULL;
; 6153 : */
; 6154 : 			pbTarget = pbTarget+cbPattern;
; 6155 : 			ulHashPattern = *(unsigned long *)(pbPattern);

  01eb7	8b 02		 mov	 eax, DWORD PTR [edx]
  01eb9	89 44 24 24	 mov	 DWORD PTR _ulHashPattern$[esp+67640], eax

; 6156 : 
; 6157 : 			SINGLET = ulHashPattern & 0xFF;
; 6158 : 			Quadruplet2nd = SINGLET<<8;

  01ebd	0f b6 c0	 movzx	 eax, al
  01ec0	8b f8		 mov	 edi, eax

; 6159 : 			Quadruplet3rd = SINGLET<<16;

  01ec2	8b c8		 mov	 ecx, eax
  01ec4	03 f3		 add	 esi, ebx
  01ec6	c1 e7 08	 shl	 edi, 8
  01ec9	c1 e1 10	 shl	 ecx, 16			; 00000010H
  01ecc	89 44 24 20	 mov	 DWORD PTR tv759[esp+67640], eax

; 6160 : 			Quadruplet4th = SINGLET<<24;

  01ed0	c1 e0 18	 shl	 eax, 24			; 00000018H
  01ed3	89 75 08	 mov	 DWORD PTR _pbTarget$[ebp], esi
  01ed6	89 7c 24 28	 mov	 DWORD PTR _Quadruplet2nd$[esp+67640], edi
  01eda	89 4c 24 2c	 mov	 DWORD PTR _Quadruplet3rd$[esp+67640], ecx
  01ede	89 44 24 1c	 mov	 DWORD PTR _Quadruplet4th$[esp+67640], eax
  01ee2	eb 04		 jmp	 SHORT $LN44@Railgun_Qu@8
$LL127@Railgun_Qu@8:
  01ee4	8b 7c 24 28	 mov	 edi, DWORD PTR _Quadruplet2nd$[esp+67640]
$LN44@Railgun_Qu@8:

; 6161 : 
; 6162 : 			for ( ;; ) {
; 6163 : 				AdvanceHopperGrass = 0;
; 6164 : 				ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  01ee8	8b c6		 mov	 eax, esi
  01eea	2b c3		 sub	 eax, ebx
  01eec	8b 00		 mov	 eax, DWORD PTR [eax]
  01eee	c7 44 24 0c 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], 0

; 6165 : 
; 6166 : 			        if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  01ef6	39 44 24 24	 cmp	 DWORD PTR _ulHashPattern$[esp+67640], eax
  01efa	75 5e		 jne	 SHORT $LN42@Railgun_Qu@8

; 6167 : 					count = cbPattern-1;

  01efc	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 6168 : 					while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  01eff	85 c0		 test	 eax, eax
  01f01	74 4f		 je	 SHORT $LN90@Railgun_Qu@8

; 6167 : 					count = cbPattern-1;

  01f03	8b ca		 mov	 ecx, edx
  01f05	8b fe		 mov	 edi, esi
  01f07	2b c8		 sub	 ecx, eax
  01f09	2b f8		 sub	 edi, eax
  01f0b	03 cb		 add	 ecx, ebx
  01f0d	8d 49 00	 npad	 3
$LL41@Railgun_Qu@8:

; 6168 : 					while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  01f10	8a 17		 mov	 dl, BYTE PTR [edi]
  01f12	88 54 24 13	 mov	 BYTE PTR tv902[esp+67640], dl
  01f16	38 11		 cmp	 BYTE PTR [ecx], dl
  01f18	75 30		 jne	 SHORT $LN40@Railgun_Qu@8

; 6169 : 						if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  01f1a	8b 74 24 0c	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  01f1e	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]
  01f21	03 f0		 add	 esi, eax
  01f23	3b d6		 cmp	 edx, esi
  01f25	75 0f		 jne	 SHORT $LN39@Railgun_Qu@8
  01f27	0f be 54 24 13	 movsx	 edx, BYTE PTR tv902[esp+67640]
  01f2c	39 54 24 20	 cmp	 DWORD PTR tv759[esp+67640], edx
  01f30	74 04		 je	 SHORT $LN39@Railgun_Qu@8
  01f32	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+67640]
$LN39@Railgun_Qu@8:

; 6170 : 						count--;
; 6171 : 					}
; 6172 : 					if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  01f36	8b 75 08	 mov	 esi, DWORD PTR _pbTarget$[ebp]
  01f39	41		 inc	 ecx
  01f3a	47		 inc	 edi
  01f3b	48		 dec	 eax
  01f3c	75 d2		 jne	 SHORT $LL41@Railgun_Qu@8
  01f3e	8b 54 24 14	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  01f42	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 6173 : 			        } else { // The goal here: to avoid memory accesses by stressing the registers.

  01f48	eb 53		 jmp	 SHORT $LN34@Railgun_Qu@8
$LN40@Railgun_Qu@8:

; 6170 : 						count--;
; 6171 : 					}
; 6172 : 					if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  01f4a	85 c0		 test	 eax, eax
  01f4c	75 4b		 jne	 SHORT $LN116@Railgun_Qu@8
  01f4e	8b 54 24 14	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
$LN90@Railgun_Qu@8:
  01f52	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 6173 : 			        } else { // The goal here: to avoid memory accesses by stressing the registers.

  01f58	eb 43		 jmp	 SHORT $LN34@Railgun_Qu@8
$LN42@Railgun_Qu@8:

; 6174 : 					if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  01f5a	8b c8		 mov	 ecx, eax
  01f5c	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  01f62	3b f9		 cmp	 edi, ecx
  01f64	74 37		 je	 SHORT $LN34@Railgun_Qu@8

; 6175 : 						AdvanceHopperGrass++;
; 6176 : 						if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  01f66	8b c8		 mov	 ecx, eax
  01f68	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  01f6e	c7 44 24 0c 01
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], 1
  01f76	39 4c 24 2c	 cmp	 DWORD PTR _Quadruplet3rd$[esp+67640], ecx
  01f7a	74 21		 je	 SHORT $LN34@Railgun_Qu@8

; 6177 : 							AdvanceHopperGrass++;
; 6178 : 							if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  01f7c	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  01f81	c7 44 24 0c 02
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], 2
  01f89	39 44 24 1c	 cmp	 DWORD PTR _Quadruplet4th$[esp+67640], eax
  01f8d	74 0e		 je	 SHORT $LN34@Railgun_Qu@8
  01f8f	c7 44 24 0c 03
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], 3
  01f97	eb 04		 jmp	 SHORT $LN34@Railgun_Qu@8
$LN116@Railgun_Qu@8:
  01f99	8b 54 24 14	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
$LN34@Railgun_Qu@8:

; 6179 : 						}
; 6180 : 					}
; 6181 : 				}
; 6182 : 
; 6183 : 				AdvanceHopperGrass++;
; 6184 : 
; 6185 : 				pbTarget = pbTarget + AdvanceHopperGrass;

  01f9d	8b 44 24 0c	 mov	 eax, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  01fa1	8d 74 06 01	 lea	 esi, DWORD PTR [esi+eax+1]
  01fa5	89 75 08	 mov	 DWORD PTR _pbTarget$[ebp], esi

; 6186 : 				if (pbTarget > pbTargetMax)

  01fa8	3b 74 24 18	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+67640]
  01fac	0f 86 32 ff ff
	ff		 jbe	 $LL127@Railgun_Qu@8

; 6265 : 		
; 6266 : 			return(NULL);

  01fb2	33 c0		 xor	 eax, eax

; 6267 : 		} //if (cbTarget<961)
; 6268 : 	} //if ( cbPattern<4)
; 6269 : }

  01fb4	5f		 pop	 edi
  01fb5	5e		 pop	 esi
  01fb6	5b		 pop	 ebx
  01fb7	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  01fbe	33 cc		 xor	 ecx, esp
  01fc0	e8 00 00 00 00	 call	 @__security_check_cookie@4
  01fc5	8b e5		 mov	 esp, ebp
  01fc7	5d		 pop	 ebp
  01fc8	c3		 ret	 0
$LN45@Railgun_Qu@8:

; 6187 : 					return(NULL);
; 6188 : 			}
; 6189 : 		} else { //if (cbTarget<961)
; 6190 : 			countSTATIC = cbPattern-2-2;

  01fc9	8d 4b fc	 lea	 ecx, DWORD PTR [ebx-4]
  01fcc	89 4c 24 20	 mov	 DWORD PTR _countSTATIC$[esp+67640], ecx
  01fd0	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]

; 6191 : 
; 6192 : 			for (a=0; a < 256; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern+1;}

  01fd3	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  01fd8	8d bc 24 30 04
	00 00		 lea	 edi, DWORD PTR _bm_bc2nd$[esp+67640]
  01fdf	f3 ab		 rep stosd
  01fe1	8b c3		 mov	 eax, ebx
  01fe3	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  01fe8	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc$[esp+67640]
  01fec	f3 ab		 rep stosd

; 6193 : 			for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 

  01fee	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  01ff1	33 c0		 xor	 eax, eax
  01ff3	85 c9		 test	 ecx, ecx
  01ff5	74 15		 je	 SHORT $LN26@Railgun_Qu@8
$LL28@Railgun_Qu@8:
  01ff7	0f be 3c 02	 movsx	 edi, BYTE PTR [edx+eax]
  01ffb	8b cb		 mov	 ecx, ebx
  01ffd	2b c8		 sub	 ecx, eax
  01fff	49		 dec	 ecx
  02000	89 4c bc 30	 mov	 DWORD PTR _bm_bc$[esp+edi*4+67640], ecx
  02004	40		 inc	 eax
  02005	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  02008	3b c1		 cmp	 eax, ecx
  0200a	72 eb		 jb	 SHORT $LL28@Railgun_Qu@8
$LN26@Railgun_Qu@8:

; 6194 : 			for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=cbPattern-j; 

  0200c	33 c0		 xor	 eax, eax
  0200e	85 db		 test	 ebx, ebx
  02010	74 14		 je	 SHORT $LN23@Railgun_Qu@8
$LL25@Railgun_Qu@8:
  02012	0f be 3c 02	 movsx	 edi, BYTE PTR [edx+eax]
  02016	8b cb		 mov	 ecx, ebx
  02018	2b c8		 sub	 ecx, eax
  0201a	40		 inc	 eax
  0201b	89 8c bc 30 04
	00 00		 mov	 DWORD PTR _bm_bc2nd$[esp+edi*4+67640], ecx
  02022	3b c3		 cmp	 eax, ebx
  02024	72 ec		 jb	 SHORT $LL25@Railgun_Qu@8
$LN23@Railgun_Qu@8:

; 6195 : 
; 6196 : 			ulHashPattern = *(unsigned long *)(pbPattern); // First four bytes

  02026	8b 12		 mov	 edx, DWORD PTR [edx]
  02028	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 6197 : 			//ulHashTarget = *(unsigned short *)(pbPattern+cbPattern-1-1); // Last two bytes
; 6198 : 		
; 6199 : 			AdvanceHopperGrass = 0;
; 6200 : 			i=0;
; 6201 : 
; 6202 : 			// Elsiane r.2  [
; 6203 : 			for (a=0; a < 256*256; a++) {bm_Horspool_Order2[a]= cbPattern-1;} // cbPattern-(Order-1) for Horspool; 'memset' if not optimized

  0202b	0f b6 c8	 movzx	 ecx, al
  0202e	68 00 00 01 00	 push	 65536			; 00010000H
  02033	89 54 24 28	 mov	 DWORD PTR _ulHashPattern$[esp+67644], edx
  02037	51		 push	 ecx
  02038	8d 94 24 38 08
	00 00		 lea	 edx, DWORD PTR _bm_Horspool_Order2$[esp+67648]
  0203f	33 ff		 xor	 edi, edi
  02041	52		 push	 edx
  02042	89 7c 24 18	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67652], edi
  02046	e8 00 00 00 00	 call	 _memset

; 6204 : 
; 6205 : 			// alfalfa 7 long 6 BBs (al lf fa al lf fa) 3 distinct BBs (al lf fa) 
; 6206 : 			// fast 4 0-1-2 fa as st
; 6207 : 			for (j=0; j < cbPattern-1; j++) bm_Horspool_Order2[*(unsigned short *)(pbPattern+j)]=j; // Rightmost appearance/position is needed

  0204b	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  0204e	83 c4 0c	 add	 esp, 12			; 0000000cH
  02051	33 c0		 xor	 eax, eax
  02053	85 c9		 test	 ecx, ecx
  02055	74 1d		 je	 SHORT $LN73@Railgun_Qu@8
  02057	eb 07 8d a4 24
	00 00 00 00	 npad	 9
$LL19@Railgun_Qu@8:
  02060	8b 54 24 14	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  02064	0f b7 14 02	 movzx	 edx, WORD PTR [edx+eax]
  02068	88 84 14 30 08
	00 00		 mov	 BYTE PTR _bm_Horspool_Order2$[esp+edx+67640], al
  0206f	40		 inc	 eax
  02070	3b c1		 cmp	 eax, ecx
  02072	72 ec		 jb	 SHORT $LL19@Railgun_Qu@8
$LN73@Railgun_Qu@8:

; 6208 : 
; 6209 : 			// Elsiane r.2 ]
; 6210 : 
; 6211 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  02074	8b 44 24 28	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+67640]
  02078	2b c3		 sub	 eax, ebx
  0207a	89 44 24 1c	 mov	 DWORD PTR tv630[esp+67640], eax
  0207e	8d 0c 1e	 lea	 ecx, DWORD PTR [esi+ebx]
  02081	eb 0d 8d a4 24
	00 00 00 00 8d
	9b 00 00 00 00	 npad	 15
$LL16@Railgun_Qu@8:

; 6212 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];

  02090	0f b7 44 39 fe	 movzx	 eax, WORD PTR [ecx+edi-2]
  02095	0f b6 84 04 30
	08 00 00	 movzx	 eax, BYTE PTR _bm_Horspool_Order2$[esp+eax+67640]

; 6213 : 
; 6214 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found

  0209d	8d 53 fe	 lea	 edx, DWORD PTR [ebx-2]
  020a0	3b c2		 cmp	 eax, edx
  020a2	75 5d		 jne	 SHORT $LN14@Railgun_Qu@8

; 6215 : 					if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  020a4	8b 4c 24 24	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+67640]
  020a8	39 0c 37	 cmp	 DWORD PTR [edi+esi], ecx
  020ab	75 35		 jne	 SHORT $LN10@Railgun_Qu@8

; 6216 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  020ad	8b 44 24 20	 mov	 eax, DWORD PTR _countSTATIC$[esp+67640]

; 6217 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  020b1	85 c0		 test	 eax, eax
  020b3	74 27		 je	 SHORT $LN89@Railgun_Qu@8

; 6216 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  020b5	8b 54 24 14	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  020b9	83 c2 04	 add	 edx, 4
  020bc	89 54 24 18	 mov	 DWORD PTR tv1069[esp+67640], edx
  020c0	8d 4c 37 04	 lea	 ecx, DWORD PTR [edi+esi+4]
$LL12@Railgun_Qu@8:

; 6217 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  020c4	8b 54 24 18	 mov	 edx, DWORD PTR tv1069[esp+67640]
  020c8	8a 12		 mov	 dl, BYTE PTR [edx]
  020ca	3a 11		 cmp	 dl, BYTE PTR [ecx]
  020cc	75 0a		 jne	 SHORT $LN11@Railgun_Qu@8

; 6218 : 							count--;

  020ce	ff 44 24 18	 inc	 DWORD PTR tv1069[esp+67640]
  020d2	41		 inc	 ecx
  020d3	48		 dec	 eax
  020d4	75 ee		 jne	 SHORT $LL12@Railgun_Qu@8

; 6219 : 						if ( count == 0) Railgunhits++; //return(pbTarget+i);

  020d6	eb 04		 jmp	 SHORT $LN89@Railgun_Qu@8
$LN11@Railgun_Qu@8:
  020d8	85 c0		 test	 eax, eax
  020da	75 06		 jne	 SHORT $LN10@Railgun_Qu@8
$LN89@Railgun_Qu@8:
  020dc	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN10@Railgun_Qu@8:

; 6220 : 					}
; 6221 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 6222 : 					if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )

  020e2	8d 0c 1e	 lea	 ecx, DWORD PTR [esi+ebx]
  020e5	0f b6 44 39 ff	 movzx	 eax, BYTE PTR [ecx+edi-1]
  020ea	0f b6 14 39	 movzx	 edx, BYTE PTR [ecx+edi]
  020ee	8b 44 84 30	 mov	 eax, DWORD PTR _bm_bc$[esp+eax*4+67640]
  020f2	8b 94 94 30 04
	00 00		 mov	 edx, DWORD PTR _bm_bc2nd$[esp+edx*4+67640]
  020f9	3b c2		 cmp	 eax, edx
  020fb	73 12		 jae	 SHORT $LN6@Railgun_Qu@8

; 6223 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  020fd	8b c2		 mov	 eax, edx

; 6224 : 					else

  020ff	eb 0e		 jmp	 SHORT $LN6@Railgun_Qu@8
$LN14@Railgun_Qu@8:

; 6225 : 					         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 6226 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2

  02101	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]
  02104	3b c2		 cmp	 eax, edx
  02106	74 07		 je	 SHORT $LN6@Railgun_Qu@8

; 6227 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position

  02108	8b d3		 mov	 edx, ebx
  0210a	2b d0		 sub	 edx, eax
  0210c	8d 42 fe	 lea	 eax, DWORD PTR [edx-2]
$LN6@Railgun_Qu@8:

; 6228 : 
; 6229 : 				i = i + Gulliver;
; 6230 : 
; 6231 : // 32323218 Order 1 Horspool Skip-table A
; 6232 : // 01234568 Order 1 Horspool Skip-table B
; 6233 : // fa af fa af fa as st Order 2 Horspool Skip-table B
; 6234 : //  0  1  2  3  4  5  6
; 6235 : // HIKARIfast
; 6236 : // fafafast
; 6237 : //   fafafast +2 Order 1 'a' vs 't'
; 6238 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-5-1 = 2) Order 1 'a' vs 't'
; 6239 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 6240 : 
; 6241 : // 76543218 Order 1 Horspool
; 6242 : // lo on ng gp pa ac ce Order 2 Horspool
; 6243 : //  0  1  2  3  4  5  6
; 6244 : // HIKARIfast
; 6245 : // longpace
; 6246 : //   longpace +2 Order 1 'a' vs 'e'
; 6247 : //        longpace +7 = (cbPattern-(Order-1) = 8-(2-1) = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 6248 : 
; 6249 : 				AdvanceHopperGrass++;

  0210f	8b 54 24 1c	 mov	 edx, DWORD PTR tv630[esp+67640]
  02113	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+67640]
  02117	03 f8		 add	 edi, eax
  02119	8d 42 ff	 lea	 eax, DWORD PTR [edx-1]
  0211c	3b f8		 cmp	 edi, eax
  0211e	0f 86 6c ff ff
	ff		 jbe	 $LL16@Railgun_Qu@8

; 6250 : 			}
; 6251 : 
; 6252 : 			if (i == cbTarget-cbPattern) {

  02124	3b fa		 cmp	 edi, edx
  02126	75 45		 jne	 SHORT $LN123@Railgun_Qu@8

; 6253 : 				if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  02128	8b 44 24 24	 mov	 eax, DWORD PTR _ulHashPattern$[esp+67640]
  0212c	39 04 37	 cmp	 DWORD PTR [edi+esi], eax
  0212f	75 35		 jne	 SHORT $LN1@Railgun_Qu@8

; 6254 : 					count = countSTATIC;

  02131	8b 44 24 20	 mov	 eax, DWORD PTR _countSTATIC$[esp+67640]

; 6255 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02135	85 c0		 test	 eax, eax
  02137	74 27		 je	 SHORT $LN88@Railgun_Qu@8

; 6254 : 					count = countSTATIC;

  02139	8b 4c 24 14	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  0213d	83 c1 04	 add	 ecx, 4
  02140	8d 74 37 04	 lea	 esi, DWORD PTR [edi+esi+4]
$LL3@Railgun_Qu@8:

; 6255 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02144	8a 11		 mov	 dl, BYTE PTR [ecx]
  02146	3a 16		 cmp	 dl, BYTE PTR [esi]
  02148	75 12		 jne	 SHORT $LN2@Railgun_Qu@8

; 6256 : 						count--;

  0214a	46		 inc	 esi
  0214b	41		 inc	 ecx
  0214c	48		 dec	 eax
  0214d	75 f5		 jne	 SHORT $LL3@Railgun_Qu@8

; 6258 : 				}
; 6259 : 				AdvanceHopperGrass++;

  0214f	8b 74 24 0c	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  02153	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  02159	46		 inc	 esi
  0215a	eb 15		 jmp	 SHORT $LN5@Railgun_Qu@8
$LN2@Railgun_Qu@8:

; 6257 : 					if ( count == 0) Railgunhits++; //return(pbTarget+i);

  0215c	85 c0		 test	 eax, eax
  0215e	75 06		 jne	 SHORT $LN1@Railgun_Qu@8
$LN88@Railgun_Qu@8:
  02160	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN1@Railgun_Qu@8:

; 6258 : 				}
; 6259 : 				AdvanceHopperGrass++;

  02166	8b 74 24 0c	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  0216a	46		 inc	 esi
  0216b	eb 04		 jmp	 SHORT $LN5@Railgun_Qu@8
$LN123@Railgun_Qu@8:
  0216d	8b 74 24 0c	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+67640]
$LN5@Railgun_Qu@8:

; 6260 : 			}
; 6261 : 
; 6262 : 			GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  02171	8b 44 24 28	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+67640]
  02175	db 44 24 28	 fild	 DWORD PTR _cbTarget$GSCopy$[esp+67640]
  02179	85 c0		 test	 eax, eax
  0217b	79 06		 jns	 SHORT $LN130@Railgun_Qu@8
  0217d	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN130@Railgun_Qu@8:
  02183	8b ce		 mov	 ecx, esi
  02185	89 4c 24 1c	 mov	 DWORD PTR tv1154[esp+67640], ecx
  02189	db 44 24 1c	 fild	 DWORD PTR tv1154[esp+67640]
  0218d	85 c9		 test	 ecx, ecx
  0218f	79 06		 jns	 SHORT $LN131@Railgun_Qu@8
  02191	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN131@Railgun_Qu@8:
  02197	de f9		 fdivp	 ST(1), ST(0)
  02199	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  0219f	e8 00 00 00 00	 call	 __ftol2_sse
  021a4	8b c8		 mov	 ecx, eax
  021a6	99		 cdq
  021a7	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 6263 : 			GlobalI += AdvanceHopperGrass;
; 6264 : 			printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);

  021ad	56		 push	 esi
  021ae	51		 push	 ecx
  021af	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  021b5	01 35 00 00 00
	00		 add	 DWORD PTR _GlobalI, esi
  021bb	68 00 00 00 00	 push	 OFFSET $SG6316
  021c0	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  021c7	e8 00 00 00 00	 call	 _printf
  021cc	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN132@Railgun_Qu@8:

; 6267 : 		} //if (cbTarget<961)
; 6268 : 	} //if ( cbPattern<4)
; 6269 : }

  021cf	8b 8c 24 34 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67640]
  021d6	5f		 pop	 edi
  021d7	5e		 pop	 esi
  021d8	5b		 pop	 ebx
  021d9	33 cc		 xor	 ecx, esp
  021db	33 c0		 xor	 eax, eax
  021dd	e8 00 00 00 00	 call	 @__security_check_cookie@4
  021e2	8b e5		 mov	 esp, ebp
  021e4	5d		 pop	 ebp
  021e5	c3		 ret	 0
_Railgun_Quadruplet_7Gulliver_count_hits ENDP
_TEXT	ENDS
PUBLIC	_p$GSCopy$
PUBLIC	__$ArrayPad$
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_p$GSCopy$ = -4132					; size = 4
_AdvanceHopperGrass$ = -4128				; size = 4
tv598 = -4124						; size = 4
tv312 = -4124						; size = 4
_s$ = -4120						; size = 1540
_f$ = -2576						; size = 1540
_occ$ = -1032						; size = 1024
__$ArrayPad$ = -4					; size = 4
_t$ = 8							; size = 4
_n$ = 12						; size = 4
_Boyer_Moore_Flensburg PROC
; _p$ = ecx
; _m$ = edx

; 6351 : {

  021f0	55		 push	 ebp
  021f1	8b ec		 mov	 ebp, esp
  021f3	83 e4 f8	 and	 esp, -8			; fffffff8H
  021f6	b8 24 10 00 00	 mov	 eax, 4132		; 00001024H
  021fb	e8 00 00 00 00	 call	 __chkstk
  02200	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  02205	33 c4		 xor	 eax, esp
  02207	89 84 24 20 10
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+4132], eax
  0220e	53		 push	 ebx
  0220f	56		 push	 esi
  02210	8b d9		 mov	 ebx, ecx
  02212	57		 push	 edi

; 6352 :     unsigned long  AdvanceHopperGrass=0;
; 6353 : 
; 6354 :     int i, j;
; 6355 :     signed int f[XSIZE+1]; //int f[m+1]; non-dynamical, here up to XSIZE long pattern.
; 6356 :     signed int s[XSIZE+1];
; 6357 :     signed int occ[ASIZE];
; 6358 : 
; 6359 : //0
; 6360 :     for (i=0; i<ASIZE; i++)
; 6361 :         occ[i]=-1;

  02213	83 c8 ff	 or	 eax, -1
  02216	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  0221b	8d bc 24 28 0c
	00 00		 lea	 edi, DWORD PTR _occ$[esp+4144]
  02222	f3 ab		 rep stosd

; 6362 : 
; 6363 :     for (j=0; j<m; j++)

  02224	33 c0		 xor	 eax, eax
  02226	89 5c 24 0c	 mov	 DWORD PTR _p$GSCopy$[esp+4144], ebx
  0222a	c7 44 24 10 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+4144], 0
  02232	85 d2		 test	 edx, edx
  02234	7e 1c		 jle	 SHORT $LN51@Boyer_Moor@2
  02236	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL22@Boyer_Moor@2:

; 6364 :     {
; 6365 :         occ[(unsigned char)p[j]]=j;

  02240	0f b6 0c 03	 movzx	 ecx, BYTE PTR [ebx+eax]
  02244	89 84 8c 28 0c
	00 00		 mov	 DWORD PTR _occ$[esp+ecx*4+4144], eax
  0224b	40		 inc	 eax
  0224c	3b c2		 cmp	 eax, edx
  0224e	7c f0		 jl	 SHORT $LL22@Boyer_Moor@2

; 6366 :     }
; 6367 : 
; 6368 : //1
; 6369 :     for (i=0; i<=m; i++)

  02250	85 d2		 test	 edx, edx
$LN51@Boyer_Moor@2:
  02252	78 22		 js	 SHORT $LN19@Boyer_Moor@2
  02254	8d 34 95 04 00
	00 00		 lea	 esi, DWORD PTR [edx*4+4]
  0225b	8b ce		 mov	 ecx, esi
  0225d	c1 e9 02	 shr	 ecx, 2
  02260	33 c0		 xor	 eax, eax
  02262	8d 7c 24 18	 lea	 edi, DWORD PTR _s$[esp+4144]
  02266	f3 ab		 rep stosd

; 6370 :     {
; 6371 :         f[i]=0;

  02268	8b ce		 mov	 ecx, esi
  0226a	c1 e9 02	 shr	 ecx, 2
  0226d	8d bc 24 20 06
	00 00		 lea	 edi, DWORD PTR _f$[esp+4144]
  02274	f3 ab		 rep stosd
$LN19@Boyer_Moor@2:

; 6372 :         s[i]=0;
; 6373 :     }
; 6374 : 
; 6375 :     i=m, j=m+1;

  02276	8d 42 01	 lea	 eax, DWORD PTR [edx+1]
  02279	8b f2		 mov	 esi, edx

; 6376 :     f[i]=j;

  0227b	89 84 94 20 06
	00 00		 mov	 DWORD PTR _f$[esp+edx*4+4144], eax

; 6377 :     while (i>0)

  02282	85 d2		 test	 edx, edx
  02284	7e 35		 jle	 SHORT $LN15@Boyer_Moor@2
$LL16@Boyer_Moor@2:

; 6378 :     {
; 6379 :         while (j<=m && p[i-1]!=p[j-1])

  02286	3b c2		 cmp	 eax, edx
  02288	7f 24		 jg	 SHORT $LN13@Boyer_Moor@2
  0228a	8a 4c 33 ff	 mov	 cl, BYTE PTR [ebx+esi-1]
$LN14@Boyer_Moor@2:
  0228e	3a 4c 03 ff	 cmp	 cl, BYTE PTR [ebx+eax-1]
  02292	74 1a		 je	 SHORT $LN13@Boyer_Moor@2

; 6380 :         {
; 6381 :             if (s[j]==0) s[j]=j-i;

  02294	83 7c 84 18 00	 cmp	 DWORD PTR _s$[esp+eax*4+4144], 0
  02299	75 08		 jne	 SHORT $LN12@Boyer_Moor@2
  0229b	8b f8		 mov	 edi, eax
  0229d	2b fe		 sub	 edi, esi
  0229f	89 7c 84 18	 mov	 DWORD PTR _s$[esp+eax*4+4144], edi
$LN12@Boyer_Moor@2:

; 6382 :             j=f[j];

  022a3	8b 84 84 20 06
	00 00		 mov	 eax, DWORD PTR _f$[esp+eax*4+4144]
  022aa	3b c2		 cmp	 eax, edx
  022ac	7e e0		 jle	 SHORT $LN14@Boyer_Moor@2
$LN13@Boyer_Moor@2:

; 6383 :         }
; 6384 :         i--; j--;

  022ae	4e		 dec	 esi
  022af	48		 dec	 eax

; 6385 :         f[i]=j;

  022b0	89 84 b4 20 06
	00 00		 mov	 DWORD PTR _f$[esp+esi*4+4144], eax
  022b7	85 f6		 test	 esi, esi
  022b9	7f cb		 jg	 SHORT $LL16@Boyer_Moor@2
$LN15@Boyer_Moor@2:

; 6386 :     }
; 6387 : 
; 6388 : //2
; 6389 :     j=f[0];

  022bb	8b 8c 24 20 06
	00 00		 mov	 ecx, DWORD PTR _f$[esp+4144]

; 6390 :     for (i=0; i<=m; i++)

  022c2	33 c0		 xor	 eax, eax
  022c4	85 d2		 test	 edx, edx
  022c6	78 1b		 js	 SHORT $LN9@Boyer_Moor@2
$LL11@Boyer_Moor@2:

; 6391 :     {
; 6392 :         if (s[i]==0) s[i]=j;

  022c8	83 7c 84 18 00	 cmp	 DWORD PTR _s$[esp+eax*4+4144], 0
  022cd	75 04		 jne	 SHORT $LN8@Boyer_Moor@2
  022cf	89 4c 84 18	 mov	 DWORD PTR _s$[esp+eax*4+4144], ecx
$LN8@Boyer_Moor@2:

; 6393 :         if (i==j) j=f[j];

  022d3	3b c1		 cmp	 eax, ecx
  022d5	75 07		 jne	 SHORT $LN10@Boyer_Moor@2
  022d7	8b 8c 8c 20 06
	00 00		 mov	 ecx, DWORD PTR _f$[esp+ecx*4+4144]
$LN10@Boyer_Moor@2:

; 6390 :     for (i=0; i<=m; i++)

  022de	40		 inc	 eax
  022df	3b c2		 cmp	 eax, edx
  022e1	7e e5		 jle	 SHORT $LL11@Boyer_Moor@2
$LN9@Boyer_Moor@2:

; 6394 :     }
; 6395 : 
; 6396 : //3
; 6397 :     i=0;
; 6398 :     while (i<=n-m)

  022e3	8b 7d 0c	 mov	 edi, DWORD PTR _n$[ebp]
  022e6	33 f6		 xor	 esi, esi
  022e8	2b fa		 sub	 edi, edx
  022ea	78 6c		 js	 SHORT $LN5@Boyer_Moor@2

; 6399 :     {
; 6400 :         j=m-1;
; 6401 :         while (j>=0 && p[j]==t[i+j]) j--;

  022ec	4a		 dec	 edx
  022ed	89 54 24 14	 mov	 DWORD PTR tv312[esp+4144], edx
  022f1	8b 54 24 18	 mov	 edx, DWORD PTR _s$[esp+4144]
$LN6@Boyer_Moor@2:
  022f5	8b 44 24 14	 mov	 eax, DWORD PTR tv312[esp+4144]
  022f9	85 c0		 test	 eax, eax
  022fb	78 26		 js	 SHORT $LN46@Boyer_Moor@2
  022fd	8b 4d 08	 mov	 ecx, DWORD PTR _t$[ebp]
  02300	03 ce		 add	 ecx, esi
$LL4@Boyer_Moor@2:
  02302	8a 1c 03	 mov	 bl, BYTE PTR [ebx+eax]
  02305	3a 1c 01	 cmp	 bl, BYTE PTR [ecx+eax]
  02308	75 11		 jne	 SHORT $LN3@Boyer_Moor@2
  0230a	48		 dec	 eax

; 6402 :         if (j<0)

  0230b	8b 5c 24 0c	 mov	 ebx, DWORD PTR _p$GSCopy$[esp+4144]
  0230f	79 f1		 jns	 SHORT $LL4@Boyer_Moor@2

; 6403 :         {
; 6404 :             Railgunhits++; //return(t+i); //report(i);

  02311	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 6405 :             i+=s[0];

  02317	03 f2		 add	 esi, edx

; 6406 :         }
; 6407 :         else 

  02319	eb 35		 jmp	 SHORT $LN1@Boyer_Moor@2
$LN3@Boyer_Moor@2:

; 6402 :         if (j<0)

  0231b	85 c0		 test	 eax, eax
  0231d	79 0e		 jns	 SHORT $LN2@Boyer_Moor@2
  0231f	8b 5c 24 0c	 mov	 ebx, DWORD PTR _p$GSCopy$[esp+4144]
$LN46@Boyer_Moor@2:

; 6403 :         {
; 6404 :             Railgunhits++; //return(t+i); //report(i);

  02323	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 6405 :             i+=s[0];

  02329	03 f2		 add	 esi, edx

; 6406 :         }
; 6407 :         else 

  0232b	eb 23		 jmp	 SHORT $LN1@Boyer_Moor@2
$LN2@Boyer_Moor@2:

; 6408 :             i+=MAX(s[j+1], j-occ[t[i+j]]);

  0232d	8b 5d 08	 mov	 ebx, DWORD PTR _t$[ebp]
  02330	8d 0c 30	 lea	 ecx, DWORD PTR [eax+esi]
  02333	0f be 1c 19	 movsx	 ebx, BYTE PTR [ecx+ebx]
  02337	8b c8		 mov	 ecx, eax
  02339	2b 8c 9c 28 0c
	00 00		 sub	 ecx, DWORD PTR _occ$[esp+ebx*4+4144]
  02340	8b 44 84 1c	 mov	 eax, DWORD PTR _s$[esp+eax*4+4148]
  02344	3b c1		 cmp	 eax, ecx
  02346	7f 02		 jg	 SHORT $LN29@Boyer_Moor@2
  02348	8b c1		 mov	 eax, ecx
$LN29@Boyer_Moor@2:
  0234a	8b 5c 24 0c	 mov	 ebx, DWORD PTR _p$GSCopy$[esp+4144]
  0234e	03 f0		 add	 esi, eax
$LN1@Boyer_Moor@2:

; 6409 : AdvanceHopperGrass++;

  02350	ff 44 24 10	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+4144]
  02354	3b f7		 cmp	 esi, edi
  02356	7e 9d		 jle	 SHORT $LN6@Boyer_Moor@2
$LN5@Boyer_Moor@2:

; 6410 :     }
; 6411 : 
; 6412 : GlobalSP += (int)((double)n/AdvanceHopperGrass*100);

  02358	8b 74 24 10	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+4144]
  0235c	db 45 0c	 fild	 DWORD PTR _n$[ebp]
  0235f	8b d6		 mov	 edx, esi
  02361	89 54 24 14	 mov	 DWORD PTR tv598[esp+4144], edx
  02365	db 44 24 14	 fild	 DWORD PTR tv598[esp+4144]
  02369	85 d2		 test	 edx, edx
  0236b	79 06		 jns	 SHORT $LN50@Boyer_Moor@2
  0236d	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN50@Boyer_Moor@2:
  02373	de f9		 fdivp	 ST(1), ST(0)
  02375	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  0237b	e8 00 00 00 00	 call	 __ftol2_sse
  02380	8b c8		 mov	 ecx, eax
  02382	99		 cdq
  02383	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 6413 : GlobalI += AdvanceHopperGrass;
; 6414 : printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)n/AdvanceHopperGrass*100), AdvanceHopperGrass);

  02389	56		 push	 esi
  0238a	51		 push	 ecx
  0238b	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  02391	01 35 00 00 00
	00		 add	 DWORD PTR _GlobalI, esi
  02397	68 00 00 00 00	 push	 OFFSET $SG6368
  0239c	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  023a3	e8 00 00 00 00	 call	 _printf

; 6415 : 
; 6416 : return(NULL);
; 6417 : }

  023a8	8b 8c 24 38 10
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+4156]
  023af	83 c4 0c	 add	 esp, 12			; 0000000cH
  023b2	5f		 pop	 edi
  023b3	5e		 pop	 esi
  023b4	5b		 pop	 ebx
  023b5	33 cc		 xor	 ecx, esp
  023b7	33 c0		 xor	 eax, eax
  023b9	e8 00 00 00 00	 call	 @__security_check_cookie@4
  023be	8b e5		 mov	 esp, ebp
  023c0	5d		 pop	 ebp
  023c1	c3		 ret	 0
_Boyer_Moore_Flensburg ENDP
_TEXT	ENDS
PUBLIC	_Railgun_Quadruplet_7Hasherezade_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7Hasherezade_count_hits PROC

; 6491 : /*
; 6492 : 	char * pbTargetMax = pbTarget + cbTarget;
; 6493 : 	register unsigned long ulHashPattern;
; 6494 : 	register unsigned long ulHashTarget;
; 6495 : 	signed long count;
; 6496 : 	signed long countSTATIC;
; 6497 : 
; 6498 : 	unsigned char SINGLET;
; 6499 : 	unsigned long Quadruplet2nd;
; 6500 : 	unsigned long Quadruplet3rd;
; 6501 : 	unsigned long Quadruplet4th;
; 6502 : 
; 6503 : 	unsigned long  AdvanceHopperGrass;
; 6504 : 
; 6505 : 	long i; //BMH needed
; 6506 : 	int a, j;
; 6507 : 	unsigned int bm_bc[256]; //BMH needed
; 6508 : 	unsigned int bm_bc2nd[256]; //BMS needed
; 6509 : 	unsigned char bm_Horspool_Order2[256*256]; //BMHSS(Elsiane) needed, 'char' limits patterns to 255, if 'long' then table becomes 256KB, grrr.
; 6510 : 	unsigned char bm_Hasherezade_HASH[1<<(HashTableSize)]; // Jesteressing 8bytes (Horspool Order 8) for fast lookup, should be bitwise (i.e. 8times smaller) since it says yes/no for presence.
; 6511 : 	uint32_t hash32;
; 6512 : 	unsigned long Gulliver; // or unsigned char or unsigned short
; 6513 : 
; 6514 : 	if (cbPattern > cbTarget)
; 6515 : 		return(NULL);
; 6516 : 
; 6517 : 	if ( cbPattern<4) { 
; 6518 : 		pbTarget = pbTarget+cbPattern;
; 6519 : 		ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));
; 6520 : 
; 6521 : 		if ( cbPattern==3) {
; 6522 : 			for ( ;; ) {
; 6523 : 				if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {
; 6524 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));
; 6525 : 				}
; 6526 : 				if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;
; 6527 : 				pbTarget++;
; 6528 : 				if (pbTarget > pbTargetMax)
; 6529 : 					return(NULL);
; 6530 : 			}
; 6531 : 		} else {
; 6532 : 		}
; 6533 : 		for ( ;; ) {
; 6534 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )
; 6535 : 				Railgunhits++; //return((pbTarget-2));
; 6536 : 			if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;
; 6537 : 			pbTarget++;
; 6538 : 			if (pbTarget > pbTargetMax)
; 6539 : 				return(NULL);
; 6540 : 		}
; 6541 : 	} else { //if ( cbPattern<4)
; 6542 : 		if (cbTarget<961) { // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.
; 6543 : 			pbTarget = pbTarget+cbPattern;
; 6544 : 			ulHashPattern = *(unsigned long *)(pbPattern);
; 6545 : 
; 6546 : 			SINGLET = ulHashPattern & 0xFF;
; 6547 : 			Quadruplet2nd = SINGLET<<8;
; 6548 : 			Quadruplet3rd = SINGLET<<16;
; 6549 : 			Quadruplet4th = SINGLET<<24;
; 6550 : 
; 6551 : 			for ( ;; ) {
; 6552 : 				AdvanceHopperGrass = 0;
; 6553 : 				ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);
; 6554 : 
; 6555 : 			        if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.
; 6556 : 					count = cbPattern-1;
; 6557 : 					while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {
; 6558 : 						if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;
; 6559 : 						count--;
; 6560 : 					}
; 6561 : 					if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));
; 6562 : 			        } else { // The goal here: to avoid memory accesses by stressing the registers.
; 6563 : 					if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {
; 6564 : 						AdvanceHopperGrass++;
; 6565 : 						if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {
; 6566 : 							AdvanceHopperGrass++;
; 6567 : 							if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;
; 6568 : 						}
; 6569 : 					}
; 6570 : 				}
; 6571 : 
; 6572 : 				AdvanceHopperGrass++;
; 6573 : 
; 6574 : 				pbTarget = pbTarget + AdvanceHopperGrass;
; 6575 : 				if (pbTarget > pbTargetMax)
; 6576 : 					return(NULL);
; 6577 : 			}
; 6578 : 		} else { //if (cbTarget<961)
; 6579 : 			countSTATIC = cbPattern-2-2;
; 6580 : 
; 6581 : 			for (a=0; a < 256; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern+1;}
; 6582 : 			for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 
; 6583 : 			for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=cbPattern-j; 
; 6584 : 
; 6585 : 			ulHashPattern = *(unsigned long *)(pbPattern); // First four bytes
; 6586 : 			//ulHashTarget = *(unsigned short *)(pbPattern+cbPattern-1-1); // Last two bytes
; 6587 : 		
; 6588 : 			AdvanceHopperGrass = 0;
; 6589 : 			i=0;
; 6590 : 
; 6591 : 			// Elsiane r.2  [
; 6592 : 			for (a=0; a < 256*256; a++) {bm_Horspool_Order2[a]= cbPattern-1;} // cbPattern-(Order-1) for Horspool; 'memset' if not optimized
; 6593 : 
; 6594 : 			// alfalfa 7 long 6 BBs (al lf fa al lf fa) 3 distinct BBs (al lf fa) 
; 6595 : 			// fast 4 0-1-2 fa as st
; 6596 : 			for (j=0; j < cbPattern-1; j++) bm_Horspool_Order2[*(unsigned short *)(pbPattern+j)]=j; // Rightmost appearance/position is needed
; 6597 : 
; 6598 : 			// Elsiane r.2  ]
; 6599 : 
; 6600 : 	if ( cbPattern>10) { 
; 6601 : 			// Hasherezade r.1 [
; 6602 : 			// OSHO.TXT has 00,046,486 03bytes distinct BBs
; 6603 : 			// OSHO.TXT has 00,248,019 04bytes distinct BBs
; 6604 : 			// OSHO.TXT has 00,855,682 05bytes distinct BBs
; 6605 : 			// OSHO.TXT has 02,236,138 06bytes distinct BBs
; 6606 : 			// OSHO.TXT has 04,803,152 07bytes distinct BBs
; 6607 : 			// OSHO.TXT has 08,956,496 08bytes distinct BBs to be hashed in 18bit i.e. 256KB i.e. 262,144 slots i.e. 34 vs 1.
; 6608 : 			// OSHO.TXT has 15,006,172 09bytes distinct BBs
; 6609 : 			// OSHO.TXT has 22,992,127 10bytes distinct BBs
; 6610 : 			// Note: BB stands for Building-Block (also suffix)
; 6611 : 
; 6612 : 			for (a=0; a < 1<<(HashTableSize); a++) {bm_Hasherezade_HASH[a]= 0;} // to-do: bit to replace byte; 'memset' if not optimized
; 6613 : 			// cbPattern - Order + 1 i.e. number of BBs for 11 'fastest fox' 11-8+1=4: 'fastest ', 'astest f', 'stest fo', 'test fox'
; 6614 : 			for (j=0; j < cbPattern-8+1; j++) {
; 6615 : 				hash32 = (2166136261 ^ (ROL(*(uint32_t *)(pbPattern+j),5)^*(uint32_t *)(pbPattern+j+4))) * 709607;        
; 6616 : 				bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]=1;
; 6617 : 			}
; 6618 : 			// Hasherezade r.1 ]
; 6619 : 
; 6620 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used
; 6621 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];
; 6622 : 
; 6623 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found
; 6624 : 					if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {
; 6625 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2
; 6626 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )
; 6627 : 							count--;
; 6628 : 						if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 6629 : 					}
; 6630 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 6631 : 					if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )
; 6632 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];
; 6633 : 					else
; 6634 : 					         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 6635 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2
; 6636 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position
; 6637 : 			
; 6638 : 				// The goal: to jump when the rightmost 8bytes (Order 8 Horspool) of window do not look like any of Needle prefixes i.e. are not to be found. This maximum jump equals cbPattern-(Order-1) or 11-(8-1)=4 for 'fastest fox' - a small one but for Needle 31 bytes the jump equals 31-(8-1)=24
; 6639 : 				if (Gulliver < cbPattern-(8-1)) { 
; 6640 : 					hash32 = (2166136261 ^ (ROL(*(uint32_t *)(pbTarget+i+cbPattern-8),5)^*(uint32_t *)(pbTarget+i+cbPattern-8+4))) * 709607;        
; 6641 : 					if ( bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]==0 )
; 6642 : 						Gulliver = cbPattern-(8-1);
; 6643 : 				}
; 6644 : 					i = i + Gulliver;
; 6645 : 				AdvanceHopperGrass++;
; 6646 : 			}
; 6647 : 
; 6648 : 	} else {
; 6649 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used
; 6650 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];
; 6651 : 
; 6652 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found
; 6653 : 					if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {
; 6654 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2
; 6655 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )
; 6656 : 							count--;
; 6657 : 						if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 6658 : 					}
; 6659 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 6660 : 					if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )
; 6661 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];
; 6662 : 					else
; 6663 : 					         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 6664 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2
; 6665 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position
; 6666 : 
; 6667 : 				i = i + Gulliver;
; 6668 : 
; 6669 : // 32323218 Order 1 Horspool Skip-table A
; 6670 : // 01234568 Order 1 Horspool Skip-table B
; 6671 : // fa af fa af fa as st Order 2 Horspool Skip-table B
; 6672 : //  0  1  2  3  4  5  6
; 6673 : // HIKARIfast
; 6674 : // fafafast
; 6675 : //   fafafast +2 Order 1 'a' vs 't'
; 6676 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-5-1 = 2) Order 1 'a' vs 't'
; 6677 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 6678 : 
; 6679 : // 76543218 Order 1 Horspool
; 6680 : // lo on ng gp pa ac ce Order 2 Horspool
; 6681 : //  0  1  2  3  4  5  6
; 6682 : // HIKARIfast
; 6683 : // longpace
; 6684 : //   longpace +2 Order 1 'a' vs 'e'
; 6685 : //        longpace +7 = (cbPattern-(Order-1) = 8-(2-1) = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 6686 : 
; 6687 : 				AdvanceHopperGrass++;
; 6688 : 			}
; 6689 : 	} //if ( cbPattern>10) { 
; 6690 : 
; 6691 : 			if (i == cbTarget-cbPattern) {
; 6692 : 				if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {
; 6693 : 					count = countSTATIC;
; 6694 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )
; 6695 : 						count--;
; 6696 : 					if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 6697 : 				}
; 6698 : 				AdvanceHopperGrass++;
; 6699 : 			}
; 6700 : 
; 6701 : 			GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);
; 6702 : 			GlobalI += AdvanceHopperGrass;
; 6703 : 			printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);
; 6704 : 		
; 6705 : 			return(NULL);
; 6706 : 		} //if (cbTarget<961)
; 6707 : 	} //if ( cbPattern<4)
; 6708 : */
; 6709 : }

  023d0	c3		 ret	 0
_Railgun_Quadruplet_7Hasherezade_count_hits ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Hasherezade
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_pbPattern$GSCopy$ = -68648				; size = 4
tv758 = -68644						; size = 4
_AdvanceHopperGrass$ = -68644				; size = 4
tv1054 = -68637						; size = 1
_ulHashPattern$ = -68636				; size = 4
tv902 = -68632						; size = 4
_countSTATIC$ = -68632					; size = 4
_Quadruplet4th$ = -68628				; size = 4
_pbTargetMax$ = -68624					; size = 4
_Quadruplet2nd$ = -68620				; size = 4
_Quadruplet3rd$ = -68616				; size = 4
_bm_bc2nd$ = -68612					; size = 1024
_bm_Hasherezade_HASH$ = -67588				; size = 2048
_bm_bc$ = -67588					; size = 1024
_bm_Horspool_Order2$ = -65540				; size = 65536
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Hasherezade PROC

; 6735 : {

  023e0	b8 28 0c 01 00	 mov	 eax, 68648		; 00010c28H
  023e5	e8 00 00 00 00	 call	 __chkstk
  023ea	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  023ef	33 c4		 xor	 eax, esp
  023f1	89 84 24 24 0c
	01 00		 mov	 DWORD PTR __$ArrayPad$[esp+68648], eax

; 6736 : 	char * pbTargetMax = pbTarget + cbTarget;

  023f8	8b 84 24 34 0c
	01 00		 mov	 eax, DWORD PTR _cbTarget$[esp+68644]
  023ff	8b 8c 24 30 0c
	01 00		 mov	 ecx, DWORD PTR _pbPattern$[esp+68644]
  02406	53		 push	 ebx

; 6737 : 	register uint32_t ulHashPattern;
; 6738 : 	register uint32_t ulHashTarget;
; 6739 : 	signed long count;
; 6740 : 	signed long countSTATIC;
; 6741 : 
; 6742 : 	unsigned char SINGLET;
; 6743 : 	uint32_t Quadruplet2nd;
; 6744 : 	uint32_t Quadruplet3rd;
; 6745 : 	uint32_t Quadruplet4th;
; 6746 : 
; 6747 : 	uint32_t AdvanceHopperGrass;
; 6748 : 
; 6749 : 	long i; //BMH needed
; 6750 : 	int a, j;
; 6751 : 	unsigned int bm_bc[256]; // BMH needed
; 6752 : 	unsigned int bm_bc2nd[256]; // BMS needed
; 6753 : 	unsigned char bm_Horspool_Order2[256*256]; // BMHSS(Elsiane) needed, 'char' limits patterns to 255, if 'long' then table becomes 256KB, grrr.
; 6754 : 	unsigned char bm_Hasherezade_HASH[1<<(HashTableSize-HashTableShrink)];
; 6755 : 	uint32_t hash32;
; 6756 : 	uint32_t hash32B;
; 6757 : 	uint32_t Gulliver; // or unsigned char or unsigned short
; 6758 : 
; 6759 : 	if (cbPattern > cbTarget) return(NULL);

  02407	8b 9c 24 3c 0c
	01 00		 mov	 ebx, DWORD PTR _cbPattern$[esp+68648]
  0240e	55		 push	 ebp
  0240f	8b ac 24 34 0c
	01 00		 mov	 ebp, DWORD PTR _pbTarget$[esp+68652]
  02416	56		 push	 esi
  02417	8d 34 28	 lea	 esi, DWORD PTR [eax+ebp]
  0241a	89 4c 24 0c	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+68660], ecx
  0241e	89 74 24 24	 mov	 DWORD PTR _pbTargetMax$[esp+68660], esi
  02422	3b d8		 cmp	 ebx, eax
  02424	76 1a		 jbe	 SHORT $LN76@Railgun_Ha
  02426	5e		 pop	 esi
  02427	5d		 pop	 ebp
  02428	33 c0		 xor	 eax, eax
  0242a	5b		 pop	 ebx

; 6981 : 
; 6982 : 		} //if (cbTarget<HaystackThreshold)
; 6983 : 	} //if ( cbPattern<4 )
; 6984 : }

  0242b	8b 8c 24 24 0c
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+68648]
  02432	33 cc		 xor	 ecx, esp
  02434	e8 00 00 00 00	 call	 @__security_check_cookie@4
  02439	81 c4 28 0c 01
	00		 add	 esp, 68648		; 00010c28H
  0243f	c3		 ret	 0
$LN76@Railgun_Ha:
  02440	57		 push	 edi

; 6760 : 
; 6761 : 	if ( cbPattern<4 ) { 

  02441	83 fb 04	 cmp	 ebx, 4
  02444	0f 83 93 00 00
	00		 jae	 $LN75@Railgun_Ha

; 6762 : 
; 6763 :         	pbTarget = pbTarget+cbPattern;
; 6764 : 		ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  0244a	0f be 01	 movsx	 eax, BYTE PTR [ecx]
  0244d	0f be 54 19 ff	 movsx	 edx, BYTE PTR [ecx+ebx-1]
  02452	c1 e0 08	 shl	 eax, 8
  02455	03 eb		 add	 ebp, ebx
  02457	03 d0		 add	 edx, eax

; 6765 : 		if ( cbPattern==3 ) {

  02459	83 fb 03	 cmp	 ebx, 3
  0245c	75 3e		 jne	 SHORT $LN80@Railgun_Ha
  0245e	8b ff		 npad	 2
$LL73@Railgun_Ha:

; 6766 : 			for ( ;; ) {
; 6767 : 				if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  02460	0f be 45 fd	 movsx	 eax, BYTE PTR [ebp-3]
  02464	0f be 7d ff	 movsx	 edi, BYTE PTR [ebp-1]
  02468	c1 e0 08	 shl	 eax, 8
  0246b	03 c7		 add	 eax, edi
  0246d	3b d0		 cmp	 edx, eax
  0246f	75 08		 jne	 SHORT $LN70@Railgun_Ha

; 6768 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  02471	8a 41 01	 mov	 al, BYTE PTR [ecx+1]
  02474	3a 45 fe	 cmp	 al, BYTE PTR [ebp-2]
  02477	74 1b		 je	 SHORT $LN95@Railgun_Ha
$LN70@Railgun_Ha:

; 6769 : 				}
; 6770 : 				if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) { 

  02479	8b c2		 mov	 eax, edx
  0247b	c1 e8 08	 shr	 eax, 8
  0247e	3a 45 fe	 cmp	 al, BYTE PTR [ebp-2]
  02481	74 07		 je	 SHORT $LN122@Railgun_Ha

; 6771 : 					pbTarget++;

  02483	45		 inc	 ebp

; 6772 : 					if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  02484	3a 45 fe	 cmp	 al, BYTE PTR [ebp-2]
  02487	74 01		 je	 SHORT $LN122@Railgun_Ha
  02489	45		 inc	 ebp
$LN122@Railgun_Ha:

; 6773 : 				}
; 6774 : 				pbTarget++;

  0248a	45		 inc	 ebp

; 6775 : 				if (pbTarget > pbTargetMax) return(NULL);

  0248b	3b ee		 cmp	 ebp, esi
  0248d	76 d1		 jbe	 SHORT $LL73@Railgun_Ha

; 6776 : 			}

  0248f	e9 13 04 00 00	 jmp	 $LN5@Railgun_Ha
$LN95@Railgun_Ha:

; 6768 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  02494	8d 45 fd	 lea	 eax, DWORD PTR [ebp-3]
  02497	e9 0d 04 00 00	 jmp	 $LN131@Railgun_Ha
$LN80@Railgun_Ha:

; 6777 : 		} else {
; 6778 : 		}
; 6779 : 		for ( ;; ) {
; 6780 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) ) return((pbTarget-2));

  0249c	8a 45 ff	 mov	 al, BYTE PTR [ebp-1]
  0249f	0f be 4d fe	 movsx	 ecx, BYTE PTR [ebp-2]
  024a3	0f be f8	 movsx	 edi, al
  024a6	c1 e1 08	 shl	 ecx, 8
  024a9	03 cf		 add	 ecx, edi
  024ab	3b d1		 cmp	 edx, ecx
  024ad	74 26		 je	 SHORT $LN97@Railgun_Ha
  024af	8b ca		 mov	 ecx, edx
  024b1	c1 e9 08	 shr	 ecx, 8
$LL65@Railgun_Ha:

; 6781 : 			if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  024b4	3a c8		 cmp	 cl, al
  024b6	74 01		 je	 SHORT $LN123@Railgun_Ha
  024b8	45		 inc	 ebp
$LN123@Railgun_Ha:

; 6782 : 			pbTarget++;

  024b9	45		 inc	 ebp

; 6783 : 			if (pbTarget > pbTargetMax) return(NULL);

  024ba	3b ee		 cmp	 ebp, esi
  024bc	0f 87 e5 03 00
	00		 ja	 $LN5@Railgun_Ha

; 6777 : 		} else {
; 6778 : 		}
; 6779 : 		for ( ;; ) {
; 6780 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) ) return((pbTarget-2));

  024c2	8a 45 ff	 mov	 al, BYTE PTR [ebp-1]
  024c5	0f be 7d fe	 movsx	 edi, BYTE PTR [ebp-2]
  024c9	0f be d8	 movsx	 ebx, al
  024cc	c1 e7 08	 shl	 edi, 8
  024cf	03 fb		 add	 edi, ebx
  024d1	3b d7		 cmp	 edx, edi
  024d3	75 df		 jne	 SHORT $LL65@Railgun_Ha
$LN97@Railgun_Ha:
  024d5	8d 45 fe	 lea	 eax, DWORD PTR [ebp-2]
  024d8	e9 cc 03 00 00	 jmp	 $LN131@Railgun_Ha
$LN75@Railgun_Ha:

; 6784 : 		}
; 6785 : 
; 6786 : 	} else {
; 6787 : 		if (cbTarget<HaystackThreshold) { // This value is arbitrary (don't know how exactly), it ensures (at least must) better performance than 'Boyer_Moore_Horspool'.

  024dd	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H
  024e2	0f 83 df 00 00
	00		 jae	 $LN59@Railgun_Ha

; 6788 : 
; 6789 : 		pbTarget = pbTarget+cbPattern;
; 6790 : 		ulHashPattern = *(uint32_t *)(pbPattern);

  024e8	8b 09		 mov	 ecx, DWORD PTR [ecx]

; 6791 : 		SINGLET = ulHashPattern & 0xFF;
; 6792 : 		Quadruplet2nd = SINGLET<<8;

  024ea	0f b6 c1	 movzx	 eax, cl
  024ed	8b d0		 mov	 edx, eax
  024ef	c1 e2 08	 shl	 edx, 8
  024f2	89 54 24 2c	 mov	 DWORD PTR _Quadruplet2nd$[esp+68664], edx

; 6793 : 		Quadruplet3rd = SINGLET<<16;

  024f6	8b f0		 mov	 esi, eax
  024f8	c1 e6 10	 shl	 esi, 16			; 00000010H

; 6794 : 		Quadruplet4th = SINGLET<<24;

  024fb	8b d0		 mov	 edx, eax
  024fd	03 eb		 add	 ebp, ebx
  024ff	c1 e2 18	 shl	 edx, 24			; 00000018H
  02502	89 4c 24 1c	 mov	 DWORD PTR _ulHashPattern$[esp+68664], ecx
  02506	89 44 24 20	 mov	 DWORD PTR tv902[esp+68664], eax
  0250a	89 74 24 30	 mov	 DWORD PTR _Quadruplet3rd$[esp+68664], esi
  0250e	89 54 24 24	 mov	 DWORD PTR _Quadruplet4th$[esp+68664], edx
$LL58@Railgun_Ha:

; 6795 : 		for ( ;; ) {
; 6796 : 			AdvanceHopperGrass = 0;
; 6797 : 			ulHashTarget = *(uint32_t *)(pbTarget-cbPattern);

  02512	8b c5		 mov	 eax, ebp
  02514	2b c3		 sub	 eax, ebx
  02516	8b 00		 mov	 eax, DWORD PTR [eax]
  02518	33 ff		 xor	 edi, edi
  0251a	89 7c 24 14	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+68664], edi

; 6798 : 			if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  0251e	3b c8		 cmp	 ecx, eax
  02520	75 5c		 jne	 SHORT $LN56@Railgun_Ha

; 6799 : 				count = cbPattern-1;

  02522	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 6800 : 				while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  02525	85 c0		 test	 eax, eax
  02527	74 3e		 je	 SHORT $LN117@Railgun_Ha

; 6799 : 				count = cbPattern-1;

  02529	8b 4c 24 10	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  0252d	8b f5		 mov	 esi, ebp
  0252f	2b c8		 sub	 ecx, eax
  02531	2b f0		 sub	 esi, eax
  02533	03 cb		 add	 ecx, ebx
$LL55@Railgun_Ha:

; 6800 : 				while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  02535	8a 16		 mov	 dl, BYTE PTR [esi]
  02537	88 54 24 1b	 mov	 BYTE PTR tv1054[esp+68664], dl
  0253b	38 11		 cmp	 BYTE PTR [ecx], dl
  0253d	75 31		 jne	 SHORT $LN54@Railgun_Ha

; 6801 : 					if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  0253f	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]
  02542	03 f8		 add	 edi, eax
  02544	3b d7		 cmp	 edx, edi
  02546	75 16		 jne	 SHORT $LN124@Railgun_Ha
  02548	0f be 54 24 1b	 movsx	 edx, BYTE PTR tv1054[esp+68664]
  0254d	39 54 24 20	 cmp	 DWORD PTR tv902[esp+68664], edx
  02551	74 0b		 je	 SHORT $LN124@Railgun_Ha
  02553	8b 7c 24 14	 mov	 edi, DWORD PTR _AdvanceHopperGrass$[esp+68664]
  02557	47		 inc	 edi
  02558	89 7c 24 14	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+68664], edi
  0255c	eb 04		 jmp	 SHORT $LN53@Railgun_Ha
$LN124@Railgun_Ha:
  0255e	8b 7c 24 14	 mov	 edi, DWORD PTR _AdvanceHopperGrass$[esp+68664]
$LN53@Railgun_Ha:

; 6802 : 					count--;

  02562	41		 inc	 ecx
  02563	46		 inc	 esi
  02564	48		 dec	 eax
  02565	75 ce		 jne	 SHORT $LL55@Railgun_Ha
$LN117@Railgun_Ha:

; 6803 : 				}
; 6804 : 				if ( count == 0) return((pbTarget-cbPattern));

  02567	8b c5		 mov	 eax, ebp
  02569	2b c3		 sub	 eax, ebx
  0256b	e9 39 03 00 00	 jmp	 $LN131@Railgun_Ha
$LN54@Railgun_Ha:
  02570	85 c0		 test	 eax, eax
  02572	74 f3		 je	 SHORT $LN117@Railgun_Ha

; 6805 : 			} else { // The goal here: to avoid memory accesses by stressing the registers.

  02574	8b 54 24 24	 mov	 edx, DWORD PTR _Quadruplet4th$[esp+68664]
  02578	8b 74 24 30	 mov	 esi, DWORD PTR _Quadruplet3rd$[esp+68664]
  0257c	eb 32		 jmp	 SHORT $LN130@Railgun_Ha
$LN56@Railgun_Ha:

; 6806 : 				if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  0257e	8b c8		 mov	 ecx, eax
  02580	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  02586	39 4c 24 2c	 cmp	 DWORD PTR _Quadruplet2nd$[esp+68664], ecx
  0258a	74 24		 je	 SHORT $LN130@Railgun_Ha

; 6807 : 					AdvanceHopperGrass++;
; 6808 : 					if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  0258c	8b c8		 mov	 ecx, eax
  0258e	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  02594	bf 01 00 00 00	 mov	 edi, 1
  02599	3b f1		 cmp	 esi, ecx
  0259b	74 13		 je	 SHORT $LN130@Railgun_Ha

; 6809 : 						AdvanceHopperGrass++;
; 6810 : 						if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  0259d	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  025a2	bf 02 00 00 00	 mov	 edi, 2
  025a7	3b d0		 cmp	 edx, eax
  025a9	74 05		 je	 SHORT $LN130@Railgun_Ha
  025ab	bf 03 00 00 00	 mov	 edi, 3
$LN130@Railgun_Ha:

; 6811 : 					}
; 6812 : 				}
; 6813 : 			}
; 6814 : 			AdvanceHopperGrass++;
; 6815 : 			pbTarget = pbTarget + AdvanceHopperGrass;

  025b0	8d 6c 2f 01	 lea	 ebp, DWORD PTR [edi+ebp+1]

; 6816 : 			if (pbTarget > pbTargetMax) return(NULL);

  025b4	3b 6c 24 28	 cmp	 ebp, DWORD PTR _pbTargetMax$[esp+68664]
  025b8	0f 87 e9 02 00
	00		 ja	 $LN5@Railgun_Ha

; 6817 : 		}

  025be	8b 4c 24 1c	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+68664]
  025c2	e9 4b ff ff ff	 jmp	 $LL58@Railgun_Ha
$LN59@Railgun_Ha:
  025c7	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]

; 6818 : 
; 6819 : 		} else { //if (cbTarget<HaystackThreshold)
; 6820 : 
; 6821 : 			countSTATIC = cbPattern-2-2;
; 6822 : 
; 6823 : 			for (a=0; a < 256; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern+1;}

  025ca	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  025cf	8d 7c 24 34	 lea	 edi, DWORD PTR _bm_bc2nd$[esp+68664]
  025d3	f3 ab		 rep stosd
  025d5	8d 53 fc	 lea	 edx, DWORD PTR [ebx-4]

; 6824 : 			for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 

  025d8	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  025db	33 c0		 xor	 eax, eax
  025dd	89 54 24 20	 mov	 DWORD PTR _countSTATIC$[esp+68664], edx
  025e1	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  025e5	85 c9		 test	 ecx, ecx
  025e7	74 1c		 je	 SHORT $LN40@Railgun_Ha
  025e9	8d a4 24 00 00
	00 00		 npad	 7
$LL42@Railgun_Ha:
  025f0	0f be 3c 02	 movsx	 edi, BYTE PTR [edx+eax]
  025f4	8b f3		 mov	 esi, ebx
  025f6	2b f0		 sub	 esi, eax
  025f8	4e		 dec	 esi
  025f9	40		 inc	 eax
  025fa	89 b4 bc 34 04
	00 00		 mov	 DWORD PTR _bm_bc$[esp+edi*4+68664], esi
  02601	3b c1		 cmp	 eax, ecx
  02603	72 eb		 jb	 SHORT $LL42@Railgun_Ha
$LN40@Railgun_Ha:

; 6825 : 			for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=cbPattern-j; 

  02605	33 c0		 xor	 eax, eax
  02607	85 db		 test	 ebx, ebx
  02609	74 16		 je	 SHORT $LN37@Railgun_Ha
  0260b	eb 03 8d 49 00	 npad	 5
$LL39@Railgun_Ha:
  02610	0f be 34 02	 movsx	 esi, BYTE PTR [edx+eax]
  02614	8b cb		 mov	 ecx, ebx
  02616	2b c8		 sub	 ecx, eax
  02618	40		 inc	 eax
  02619	89 4c b4 34	 mov	 DWORD PTR _bm_bc2nd$[esp+esi*4+68664], ecx
  0261d	3b c3		 cmp	 eax, ebx
  0261f	72 ef		 jb	 SHORT $LL39@Railgun_Ha
$LN37@Railgun_Ha:

; 6826 : 
; 6827 : 			ulHashPattern = *(uint32_t *)(pbPattern); // First four bytes

  02621	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  02625	8b 17		 mov	 edx, DWORD PTR [edi]
  02627	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 6828 : 			//ulHashTarget = *(unsigned short *)(pbPattern+cbPattern-1-1); // Last two bytes
; 6829 : 		
; 6830 : 			i=0;
; 6831 : 			for (a=0; a < 256*256; a++) {bm_Horspool_Order2[a]= cbPattern-1;} // cbPattern-(Order-1) for Horspool; 'memset' if not optimized

  0262a	0f b6 c8	 movzx	 ecx, al
  0262d	68 00 00 01 00	 push	 65536			; 00010000H
  02632	89 54 24 20	 mov	 DWORD PTR _ulHashPattern$[esp+68668], edx
  02636	51		 push	 ecx
  02637	8d 94 24 3c 0c
	00 00		 lea	 edx, DWORD PTR _bm_Horspool_Order2$[esp+68672]
  0263e	52		 push	 edx
  0263f	33 f6		 xor	 esi, esi
  02641	e8 00 00 00 00	 call	 _memset

; 6832 : 			for (j=0; j < cbPattern-1; j++) bm_Horspool_Order2[*(unsigned short *)(pbPattern+j)]=j; // Rightmost appearance/position is needed

  02646	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  02649	83 c4 0c	 add	 esp, 12			; 0000000cH
  0264c	33 c0		 xor	 eax, eax
  0264e	85 c9		 test	 ecx, ecx
  02650	74 10		 je	 SHORT $LN31@Railgun_Ha
$LL33@Railgun_Ha:
  02652	0f b7 14 07	 movzx	 edx, WORD PTR [edi+eax]
  02656	88 84 14 34 0c
	00 00		 mov	 BYTE PTR _bm_Horspool_Order2$[esp+edx+68664], al
  0265d	40		 inc	 eax
  0265e	3b c1		 cmp	 eax, ecx
  02660	72 f0		 jb	 SHORT $LL33@Railgun_Ha
$LN31@Railgun_Ha:

; 6833 : 
; 6834 : 	if ( cbPattern>NeedleThreshold ) { 

  02662	83 fb 09	 cmp	 ebx, 9
  02665	0f 86 b8 01 00
	00		 jbe	 $LN92@Railgun_Ha

; 6835 : 
; 6836 : 			for (a=0; a < 1<<(HashTableSize-HashTableShrink); a++) {bm_Hasherezade_HASH[a]= 0;} // to-do: 'memset' if not optimized

  0266b	68 00 08 00 00	 push	 2048			; 00000800H
  02670	8d 84 24 38 04
	00 00		 lea	 eax, DWORD PTR _bm_Hasherezade_HASH$[esp+68668]
  02677	6a 00		 push	 0
  02679	50		 push	 eax
  0267a	e8 00 00 00 00	 call	 _memset

; 6837 : 			// cbPattern - Order + 1 i.e. number of BBs for 11 'fastest fox' 11-8+1=4: 'fastest ', 'astest f', 'stest fo', 'test fox'
; 6838 : #ifdef HasherezadeOrder8
; 6839 : 			for (j=0; j < cbPattern-8+1; j++) {
; 6840 : 				hash32 = (2166136261 ^ *(uint32_t*)(pbPattern+j+0)) * 709607;
; 6841 : 				hash32B = (2166136261 ^ *(uint32_t*)(pbPattern+j+4)) * 709607;
; 6842 : 				hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;
; 6843 : #ifdef HasherezadeBYTEWISE
; 6844 : 				bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]=1;
; 6845 : #else				
; 6846 : 				hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );
; 6847 : 				bm_Hasherezade_HASH[hash32>>3]= bm_Hasherezade_HASH[hash32>>3] | (1<<(hash32&0x7));
; 6848 : #endif
; 6849 : #else
; 6850 : 			for (j=0; j < cbPattern-4+1; j++) {

  0267f	8d 43 fd	 lea	 eax, DWORD PTR [ebx-3]
  02682	83 c4 0c	 add	 esp, 12			; 0000000cH
  02685	33 d2		 xor	 edx, edx
  02687	85 c0		 test	 eax, eax
  02689	74 5e		 je	 SHORT $LN90@Railgun_Ha
  0268b	eb 03 8d 49 00	 npad	 5
$LL26@Railgun_Ha:

; 6851 : 				hash32 = (2166136261 ^ *(uint16_t*)(pbPattern+j+0)) * 709607;
; 6852 : 				hash32B = (2166136261 ^ *(uint16_t*)(pbPattern+j+2)) * 709607;
; 6853 : 				hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;

  02690	8b 4c 24 10	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  02694	0f b7 44 11 02	 movzx	 eax, WORD PTR [ecx+edx+2]
  02699	0f b7 0c 11	 movzx	 ecx, WORD PTR [ecx+edx]
  0269d	35 c5 9d 1c 81	 xor	 eax, -2128831035	; 811c9dc5H
  026a2	69 c0 e7 d3 0a
	00		 imul	 eax, 709607		; 000ad3e7H
  026a8	81 f1 c5 9d 1c
	81		 xor	 ecx, -2128831035	; 811c9dc5H
  026ae	69 c9 e7 d3 0a
	00		 imul	 ecx, 709607		; 000ad3e7H
  026b4	c1 c0 05	 rol	 eax, 5
  026b7	33 c1		 xor	 eax, ecx
  026b9	69 c0 e7 d3 0a
	00		 imul	 eax, 709607		; 000ad3e7H

; 6854 : #ifdef HasherezadeBYTEWISE
; 6855 : 				bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]=1;
; 6856 : #else				
; 6857 : 				hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );

  026bf	8b c8		 mov	 ecx, eax
  026c1	c1 e9 10	 shr	 ecx, 16			; 00000010H
  026c4	33 c8		 xor	 ecx, eax
  026c6	81 e1 ff 3f 00
	00		 and	 ecx, 16383		; 00003fffH

; 6858 : 				bm_Hasherezade_HASH[hash32>>3]= bm_Hasherezade_HASH[hash32>>3] | (1<<(hash32&0x7));

  026cc	8b c1		 mov	 eax, ecx
  026ce	c1 e8 03	 shr	 eax, 3
  026d1	8d bc 04 34 04
	00 00		 lea	 edi, DWORD PTR _bm_Hasherezade_HASH$[esp+eax+68664]
  026d8	83 e1 07	 and	 ecx, 7
  026db	b0 01		 mov	 al, 1
  026dd	d2 e0		 shl	 al, cl
  026df	42		 inc	 edx
  026e0	08 07		 or	 BYTE PTR [edi], al
  026e2	8d 43 fd	 lea	 eax, DWORD PTR [ebx-3]
  026e5	3b d0		 cmp	 edx, eax
  026e7	72 a7		 jb	 SHORT $LL26@Railgun_Ha
$LN90@Railgun_Ha:

; 6859 : #endif
; 6860 : #endif
; 6861 : 			}
; 6862 : 
; 6863 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  026e9	8b 84 24 44 0c
	01 00		 mov	 eax, DWORD PTR _cbTarget$[esp+68660]
  026f0	2b c3		 sub	 eax, ebx
  026f2	89 44 24 14	 mov	 DWORD PTR tv758[esp+68664], eax
  026f6	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL23@Railgun_Ha:

; 6864 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];

  02700	8d 04 2b	 lea	 eax, DWORD PTR [ebx+ebp]
  02703	0f b7 4c 30 fe	 movzx	 ecx, WORD PTR [eax+esi-2]
  02708	0f b6 bc 0c 34
	0c 00 00	 movzx	 edi, BYTE PTR _bm_Horspool_Order2$[esp+ecx+68664]

; 6865 : 
; 6866 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found

  02710	8d 43 fe	 lea	 eax, DWORD PTR [ebx-2]
  02713	3b f8		 cmp	 edi, eax
  02715	75 40		 jne	 SHORT $LN21@Railgun_Ha

; 6867 : 					if ( *(uint32_t *)&pbTarget[i] == ulHashPattern) {

  02717	8b 54 24 1c	 mov	 edx, DWORD PTR _ulHashPattern$[esp+68664]
  0271b	39 14 2e	 cmp	 DWORD PTR [esi+ebp], edx
  0271e	75 2a		 jne	 SHORT $LN17@Railgun_Ha

; 6868 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  02720	8b 44 24 20	 mov	 eax, DWORD PTR _countSTATIC$[esp+68664]

; 6869 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02724	85 c0		 test	 eax, eax
  02726	74 16		 je	 SHORT $LN102@Railgun_Ha

; 6868 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  02728	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  0272c	83 c7 04	 add	 edi, 4
  0272f	8d 4c 2e 04	 lea	 ecx, DWORD PTR [esi+ebp+4]
$LL19@Railgun_Ha:

; 6869 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02733	8a 17		 mov	 dl, BYTE PTR [edi]
  02735	3a 11		 cmp	 dl, BYTE PTR [ecx]
  02737	75 0d		 jne	 SHORT $LN18@Railgun_Ha

; 6870 : 							count--;

  02739	41		 inc	 ecx
  0273a	47		 inc	 edi
  0273b	48		 dec	 eax
  0273c	75 f5		 jne	 SHORT $LL19@Railgun_Ha
$LN102@Railgun_Ha:

; 6963 : 					}
; 6964 : 					if ( count == 0) return(pbTarget+i);

  0273e	8d 04 2e	 lea	 eax, DWORD PTR [esi+ebp]
  02741	e9 63 01 00 00	 jmp	 $LN131@Railgun_Ha
$LN18@Railgun_Ha:

; 6871 : 						if ( count == 0) return(pbTarget+i);

  02746	85 c0		 test	 eax, eax
  02748	74 f4		 je	 SHORT $LN102@Railgun_Ha
$LN17@Railgun_Ha:

; 6872 : 					}
; 6873 : 					//if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )
; 6874 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  0274a	8d 04 2b	 lea	 eax, DWORD PTR [ebx+ebp]
  0274d	0f b6 04 30	 movzx	 eax, BYTE PTR [eax+esi]
  02751	8b 7c 84 34	 mov	 edi, DWORD PTR _bm_bc2nd$[esp+eax*4+68664]
  02755	eb 0e		 jmp	 SHORT $LN15@Railgun_Ha
$LN21@Railgun_Ha:

; 6875 : 					//else
; 6876 : 					//         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 6877 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2

  02757	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]
  0275a	3b f8		 cmp	 edi, eax
  0275c	74 07		 je	 SHORT $LN15@Railgun_Ha

; 6878 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position

  0275e	8b cb		 mov	 ecx, ebx
  02760	2b cf		 sub	 ecx, edi
  02762	8d 79 fe	 lea	 edi, DWORD PTR [ecx-2]
$LN15@Railgun_Ha:

; 6879 : 			
; 6880 : 				// The goal: to jump when the rightmost 8bytes (Order 8 Horspool) of window do not look like any of Needle prefixes i.e. are not to be found. This maximum jump equals cbPattern-(Order-1) or 11-(8-1)=4 for 'fastest fox' - a small one but for Needle 31 bytes the jump equals 31-(8-1)=24
; 6881 : #ifdef HasherezadeOrder8
; 6882 : 				if (Gulliver + (JumpThreshold) < cbPattern-(8-1)) { 
; 6883 : 					hash32 = (2166136261 ^ *(uint32_t*)(pbTarget+i+cbPattern-8+0)) * 709607;
; 6884 : 					hash32B = (2166136261 ^ *(uint32_t*)(pbTarget+i+cbPattern-8+4)) * 709607;
; 6885 : 					hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;
; 6886 : #ifdef HasherezadeBYTEWISE
; 6887 : 					if ( bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]==0 )
; 6888 : 						Gulliver = cbPattern-(8-1);
; 6889 : #else
; 6890 : 					hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );
; 6891 : 					if ( (bm_Hasherezade_HASH[hash32>>3] & (1<<(hash32&0x7))) ==0 )
; 6892 : 						Gulliver = cbPattern-(8-1);
; 6893 : #endif
; 6894 : 				}
; 6895 : #else
; 6896 : 				if (Gulliver + (JumpThreshold) < cbPattern-(4-1)) { 

  02765	8d 57 01	 lea	 edx, DWORD PTR [edi+1]
  02768	8d 43 fd	 lea	 eax, DWORD PTR [ebx-3]
  0276b	3b d0		 cmp	 edx, eax
  0276d	73 57		 jae	 SHORT $LN127@Railgun_Ha

; 6897 : 					hash32 = (2166136261 ^ *(uint16_t*)(pbTarget+i+cbPattern-4+0)) * 709607;
; 6898 : 					hash32B = (2166136261 ^ *(uint16_t*)(pbTarget+i+cbPattern-4+2)) * 709607;
; 6899 : 					hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;

  0276f	8d 0c 2b	 lea	 ecx, DWORD PTR [ebx+ebp]
  02772	0f b7 44 31 fe	 movzx	 eax, WORD PTR [ecx+esi-2]
  02777	0f b7 4c 31 fc	 movzx	 ecx, WORD PTR [ecx+esi-4]
  0277c	35 c5 9d 1c 81	 xor	 eax, -2128831035	; 811c9dc5H
  02781	69 c0 e7 d3 0a
	00		 imul	 eax, 709607		; 000ad3e7H
  02787	81 f1 c5 9d 1c
	81		 xor	 ecx, -2128831035	; 811c9dc5H
  0278d	69 c9 e7 d3 0a
	00		 imul	 ecx, 709607		; 000ad3e7H
  02793	c1 c0 05	 rol	 eax, 5
  02796	33 c1		 xor	 eax, ecx
  02798	69 c0 e7 d3 0a
	00		 imul	 eax, 709607		; 000ad3e7H

; 6900 : #ifdef HasherezadeBYTEWISE
; 6901 : 					if ( bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]==0 )
; 6902 : 						Gulliver = cbPattern-(4-1);
; 6903 : #else
; 6904 : 					hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );

  0279e	8b d0		 mov	 edx, eax
  027a0	c1 ea 10	 shr	 edx, 16			; 00000010H
  027a3	33 d0		 xor	 edx, eax
  027a5	81 e2 ff 3f 00
	00		 and	 edx, 16383		; 00003fffH

; 6905 : 					if ( (bm_Hasherezade_HASH[hash32>>3] & (1<<(hash32&0x7))) ==0 )

  027ab	8b ca		 mov	 ecx, edx
  027ad	83 e1 07	 and	 ecx, 7
  027b0	b8 01 00 00 00	 mov	 eax, 1
  027b5	d3 e0		 shl	 eax, cl
  027b7	c1 ea 03	 shr	 edx, 3
  027ba	84 84 14 34 04
	00 00		 test	 al, BYTE PTR _bm_Hasherezade_HASH$[esp+edx+68664]
  027c1	75 03		 jne	 SHORT $LN127@Railgun_Ha

; 6906 : 						Gulliver = cbPattern-(4-1);

  027c3	8d 7b fd	 lea	 edi, DWORD PTR [ebx-3]
$LN127@Railgun_Ha:

; 6859 : #endif
; 6860 : #endif
; 6861 : 			}
; 6862 : 
; 6863 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  027c6	8b 44 24 14	 mov	 eax, DWORD PTR tv758[esp+68664]

; 6907 : #endif
; 6908 : 				}
; 6909 : #endif
; 6910 : 					i = i + Gulliver;

  027ca	03 f7		 add	 esi, edi

; 6911 : 				GlobalI++;

  027cc	83 05 00 00 00
	00 01		 add	 DWORD PTR _GlobalI, 1
  027d3	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  027da	48		 dec	 eax
  027db	3b f0		 cmp	 esi, eax
  027dd	0f 86 1d ff ff
	ff		 jbe	 $LL23@Railgun_Ha
$LN125@Railgun_Ha:

; 6968 : 			}
; 6969 : 	} //if ( cbPattern>NeedleThreshold )
; 6970 : 
; 6971 : 			if (i == cbTarget-cbPattern) {

  027e3	3b 74 24 14	 cmp	 esi, DWORD PTR tv758[esp+68664]
  027e7	0f 85 ba 00 00
	00		 jne	 $LN5@Railgun_Ha

; 6972 : 				if ( *(uint32_t *)&pbTarget[i] == ulHashPattern) {

  027ed	8b 44 24 1c	 mov	 eax, DWORD PTR _ulHashPattern$[esp+68664]
  027f1	03 f5		 add	 esi, ebp
  027f3	39 06		 cmp	 DWORD PTR [esi], eax
  027f5	0f 85 9e 00 00
	00		 jne	 $LN128@Railgun_Ha

; 6973 : 					count = countSTATIC;

  027fb	8b 4c 24 20	 mov	 ecx, DWORD PTR _countSTATIC$[esp+68664]

; 6974 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  027ff	85 c9		 test	 ecx, ecx
  02801	0f 84 8e 00 00
	00		 je	 $LN116@Railgun_Ha

; 6973 : 					count = countSTATIC;

  02807	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  0280b	83 c7 04	 add	 edi, 4
  0280e	8d 56 04	 lea	 edx, DWORD PTR [esi+4]
$LL3@Railgun_Ha:

; 6974 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02811	8a 07		 mov	 al, BYTE PTR [edi]
  02813	3a 02		 cmp	 al, BYTE PTR [edx]
  02815	75 7a		 jne	 SHORT $LN2@Railgun_Ha

; 6975 : 						count--;

  02817	42		 inc	 edx
  02818	47		 inc	 edi
  02819	49		 dec	 ecx
  0281a	75 f5		 jne	 SHORT $LL3@Railgun_Ha

; 6976 : 					if ( count == 0) return(pbTarget+i);

  0281c	8b c6		 mov	 eax, esi
  0281e	e9 86 00 00 00	 jmp	 $LN131@Railgun_Ha
$LN92@Railgun_Ha:

; 6912 : 			}
; 6913 : 
; 6914 : 	} else { //if ( cbPattern>NeedleThreshold )
; 6915 : // Slower than pure Sunday, that's why commented (for small needles there is no much gain in choosing a bigger stride):
; 6916 : /*
; 6917 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used
; 6918 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];
; 6919 : 
; 6920 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found
; 6921 : 					if ( *(uint32_t *)&pbTarget[i] == ulHashPattern) {
; 6922 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2
; 6923 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )
; 6924 : 							count--;
; 6925 : 						if ( count == 0) return(pbTarget+i);
; 6926 : 					}
; 6927 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 6928 : 					if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )
; 6929 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];
; 6930 : 					else
; 6931 : 					         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 6932 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2
; 6933 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position
; 6934 : 
; 6935 : 				i = i + Gulliver;
; 6936 : 
; 6937 : // 32323218 Order 1 Horspool Skip-table A
; 6938 : // 01234568 Order 1 Horspool Skip-table B
; 6939 : // fa af fa af fa as st Order 2 Horspool Skip-table B
; 6940 : //  0  1  2  3  4  5  6
; 6941 : // HIKARIfast
; 6942 : // fafafast
; 6943 : //   fafafast +2 Order 1 'a' vs 't'
; 6944 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-5-1 = 2) Order 1 'a' vs 't'
; 6945 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 6946 : 
; 6947 : // 76543218 Order 1 Horspool
; 6948 : // lo on ng gp pa ac ce Order 2 Horspool
; 6949 : //  0  1  2  3  4  5  6
; 6950 : // HIKARIfast
; 6951 : // longpace
; 6952 : //   longpace +2 Order 1 'a' vs 'e'
; 6953 : //        longpace +7 = (cbPattern-(Order-1) = 8-(2-1) = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 6954 : 
; 6955 : 				GlobalI++;
; 6956 : 			}
; 6957 : */
; 6958 : 			while (i <= cbTarget-cbPattern-1) {

  02823	8b 8c 24 44 0c
	01 00		 mov	 ecx, DWORD PTR _cbTarget$[esp+68660]
  0282a	2b cb		 sub	 ecx, ebx
  0282c	89 4c 24 14	 mov	 DWORD PTR tv758[esp+68664], ecx
$LL11@Railgun_Ha:

; 6959 : 				if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  02830	8b 54 24 1c	 mov	 edx, DWORD PTR _ulHashPattern$[esp+68664]
  02834	39 14 2e	 cmp	 DWORD PTR [esi+ebp], edx
  02837	75 33		 jne	 SHORT $LN6@Railgun_Ha

; 6960 : 					count = countSTATIC;

  02839	8b 44 24 20	 mov	 eax, DWORD PTR _countSTATIC$[esp+68664]

; 6961 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  0283d	85 c0		 test	 eax, eax
  0283f	0f 84 f9 fe ff
	ff		 je	 $LN102@Railgun_Ha

; 6960 : 					count = countSTATIC;

  02845	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  02849	83 c7 04	 add	 edi, 4
  0284c	8d 4c 2e 04	 lea	 ecx, DWORD PTR [esi+ebp+4]
$LL8@Railgun_Ha:

; 6961 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  02850	8a 17		 mov	 dl, BYTE PTR [edi]
  02852	3a 11		 cmp	 dl, BYTE PTR [ecx]
  02854	75 0a		 jne	 SHORT $LN7@Railgun_Ha

; 6962 : 						count--;

  02856	41		 inc	 ecx
  02857	47		 inc	 edi
  02858	48		 dec	 eax
  02859	75 f5		 jne	 SHORT $LL8@Railgun_Ha

; 6963 : 					}
; 6964 : 					if ( count == 0) return(pbTarget+i);

  0285b	8d 04 2e	 lea	 eax, DWORD PTR [esi+ebp]
  0285e	eb 49		 jmp	 SHORT $LN131@Railgun_Ha
$LN7@Railgun_Ha:
  02860	85 c0		 test	 eax, eax
  02862	0f 84 d6 fe ff
	ff		 je	 $LN102@Railgun_Ha
  02868	8b 4c 24 14	 mov	 ecx, DWORD PTR tv758[esp+68664]
$LN6@Railgun_Ha:

; 6965 : 				}
; 6966 : 				i= i + bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  0286c	8d 04 2e	 lea	 eax, DWORD PTR [esi+ebp]
  0286f	0f b6 14 18	 movzx	 edx, BYTE PTR [eax+ebx]
  02873	03 74 94 34	 add	 esi, DWORD PTR _bm_bc2nd$[esp+edx*4+68664]

; 6967 : 				GlobalI++;

  02877	83 05 00 00 00
	00 01		 add	 DWORD PTR _GlobalI, 1
  0287e	8d 41 ff	 lea	 eax, DWORD PTR [ecx-1]
  02881	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  02888	3b f0		 cmp	 esi, eax
  0288a	76 a4		 jbe	 SHORT $LL11@Railgun_Ha

; 6912 : 			}
; 6913 : 
; 6914 : 	} else { //if ( cbPattern>NeedleThreshold )
; 6915 : // Slower than pure Sunday, that's why commented (for small needles there is no much gain in choosing a bigger stride):
; 6916 : /*
; 6917 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used
; 6918 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];
; 6919 : 
; 6920 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found
; 6921 : 					if ( *(uint32_t *)&pbTarget[i] == ulHashPattern) {
; 6922 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2
; 6923 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )
; 6924 : 							count--;
; 6925 : 						if ( count == 0) return(pbTarget+i);
; 6926 : 					}
; 6927 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 6928 : 					if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )
; 6929 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];
; 6930 : 					else
; 6931 : 					         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 6932 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2
; 6933 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position
; 6934 : 
; 6935 : 				i = i + Gulliver;
; 6936 : 
; 6937 : // 32323218 Order 1 Horspool Skip-table A
; 6938 : // 01234568 Order 1 Horspool Skip-table B
; 6939 : // fa af fa af fa as st Order 2 Horspool Skip-table B
; 6940 : //  0  1  2  3  4  5  6
; 6941 : // HIKARIfast
; 6942 : // fafafast
; 6943 : //   fafafast +2 Order 1 'a' vs 't'
; 6944 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-5-1 = 2) Order 1 'a' vs 't'
; 6945 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 6946 : 
; 6947 : // 76543218 Order 1 Horspool
; 6948 : // lo on ng gp pa ac ce Order 2 Horspool
; 6949 : //  0  1  2  3  4  5  6
; 6950 : // HIKARIfast
; 6951 : // longpace
; 6952 : //   longpace +2 Order 1 'a' vs 'e'
; 6953 : //        longpace +7 = (cbPattern-(Order-1) = 8-(2-1) = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 6954 : 
; 6955 : 				GlobalI++;
; 6956 : 			}
; 6957 : */
; 6958 : 			while (i <= cbTarget-cbPattern-1) {

  0288c	e9 52 ff ff ff	 jmp	 $LN125@Railgun_Ha
$LN2@Railgun_Ha:

; 6976 : 					if ( count == 0) return(pbTarget+i);

  02891	85 c9		 test	 ecx, ecx
  02893	75 04		 jne	 SHORT $LN128@Railgun_Ha
$LN116@Railgun_Ha:
  02895	8b c6		 mov	 eax, esi
  02897	eb 10		 jmp	 SHORT $LN131@Railgun_Ha
$LN128@Railgun_Ha:

; 6977 : 				}
; 6978 : 				GlobalI++;

  02899	83 05 00 00 00
	00 01		 add	 DWORD PTR _GlobalI, 1
  028a0	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
$LN5@Railgun_Ha:

; 6979 : 			}
; 6980 : 			return(NULL);

  028a7	33 c0		 xor	 eax, eax
$LN131@Railgun_Ha:

; 6981 : 
; 6982 : 		} //if (cbTarget<HaystackThreshold)
; 6983 : 	} //if ( cbPattern<4 )
; 6984 : }

  028a9	8b 8c 24 34 0c
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+68664]
  028b0	5f		 pop	 edi
  028b1	5e		 pop	 esi
  028b2	5d		 pop	 ebp
  028b3	5b		 pop	 ebx
  028b4	33 cc		 xor	 ecx, esp
  028b6	e8 00 00 00 00	 call	 @__security_check_cookie@4
  028bb	81 c4 28 0c 01
	00		 add	 esp, 68648		; 00010c28H
  028c1	c3		 ret	 0
_Railgun_Hasherezade ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Hasherezade_O8_BYTE
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_countSTATIC$ = -84008					; size = 4
_AdvanceHopperGrass$ = -84008				; size = 4
tv1043 = -84001						; size = 1
_pbPattern$GSCopy$ = -84000				; size = 4
_ulHashPattern$ = -83996				; size = 4
tv891 = -83992						; size = 4
tv751 = -83992						; size = 4
_Quadruplet3rd$ = -83988				; size = 4
_Quadruplet2nd$ = -83984				; size = 4
_Quadruplet4th$ = -83980				; size = 4
_pbTargetMax$ = -83976					; size = 4
_bm_bc2nd$ = -83972					; size = 1024
_bm_Hasherezade_HASH$ = -81924				; size = 16384
_bm_Horspool_Order2$ = -65540				; size = 65568
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Hasherezade_O8_BYTE PROC

; 6995 : {

  028d0	b8 28 48 01 00	 mov	 eax, 84008		; 00014828H
  028d5	e8 00 00 00 00	 call	 __chkstk
  028da	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  028df	33 c4		 xor	 eax, esp
  028e1	89 84 24 24 48
	01 00		 mov	 DWORD PTR __$ArrayPad$[esp+84008], eax

; 6996 : 	char * pbTargetMax = pbTarget + cbTarget;

  028e8	8b 84 24 34 48
	01 00		 mov	 eax, DWORD PTR _cbTarget$[esp+84004]
  028ef	8b 94 24 30 48
	01 00		 mov	 edx, DWORD PTR _pbPattern$[esp+84004]
  028f6	53		 push	 ebx

; 6997 : 	register uint32_t ulHashPattern;
; 6998 : 	register uint32_t ulHashTarget;
; 6999 : 	signed long count;
; 7000 : 	signed long countSTATIC;
; 7001 : 
; 7002 : 	unsigned char SINGLET;
; 7003 : 	uint32_t Quadruplet2nd;
; 7004 : 	uint32_t Quadruplet3rd;
; 7005 : 	uint32_t Quadruplet4th;
; 7006 : 
; 7007 : 	uint32_t AdvanceHopperGrass;
; 7008 : 
; 7009 : 	long i; //BMH needed
; 7010 : 	int a, j;
; 7011 : 	unsigned int bm_bc[256]; // BMH needed
; 7012 : 	unsigned int bm_bc2nd[256]; // BMS needed
; 7013 : 	unsigned char bm_Horspool_Order2[256*256]; // BMHSS(Elsiane) needed, 'char' limits patterns to 255, if 'long' then table becomes 256KB, grrr.
; 7014 : 	unsigned char bm_Hasherezade_HASH[1<<(HashTableSize-DUMBO_HashTableShrink)];
; 7015 : 	uint32_t hash32;
; 7016 : 	uint32_t hash32B;
; 7017 : 	uint32_t Gulliver; // or unsigned char or unsigned short
; 7018 : 
; 7019 : 	if (cbPattern > cbTarget) return(NULL);

  028f7	8b 9c 24 3c 48
	01 00		 mov	 ebx, DWORD PTR _cbPattern$[esp+84008]
  028fe	55		 push	 ebp
  028ff	8b ac 24 34 48
	01 00		 mov	 ebp, DWORD PTR _pbTarget$[esp+84012]
  02906	56		 push	 esi
  02907	8d 34 28	 lea	 esi, DWORD PTR [eax+ebp]
  0290a	89 54 24 14	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+84020], edx
  0290e	89 74 24 2c	 mov	 DWORD PTR _pbTargetMax$[esp+84020], esi
  02912	3b d8		 cmp	 ebx, eax
  02914	76 1a		 jbe	 SHORT $LN76@Railgun_Ha@2
  02916	5e		 pop	 esi
  02917	5d		 pop	 ebp
  02918	33 c0		 xor	 eax, eax
  0291a	5b		 pop	 ebx

; 7241 : 
; 7242 : 		} //if (cbTarget<HaystackThreshold)
; 7243 : 	} //if ( cbPattern<4 )
; 7244 : }

  0291b	8b 8c 24 24 48
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+84008]
  02922	33 cc		 xor	 ecx, esp
  02924	e8 00 00 00 00	 call	 @__security_check_cookie@4
  02929	81 c4 28 48 01
	00		 add	 esp, 84008		; 00014828H
  0292f	c3		 ret	 0
$LN76@Railgun_Ha@2:
  02930	57		 push	 edi

; 7020 : 
; 7021 : 	if ( cbPattern<4 ) { 

  02931	83 fb 04	 cmp	 ebx, 4
  02934	0f 83 93 00 00
	00		 jae	 $LN75@Railgun_Ha@2

; 7022 : 
; 7023 :         	pbTarget = pbTarget+cbPattern;
; 7024 : 		ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  0293a	0f be 02	 movsx	 eax, BYTE PTR [edx]
  0293d	0f be 4c 1a ff	 movsx	 ecx, BYTE PTR [edx+ebx-1]
  02942	c1 e0 08	 shl	 eax, 8
  02945	03 eb		 add	 ebp, ebx
  02947	03 c8		 add	 ecx, eax

; 7025 : 		if ( cbPattern==3 ) {

  02949	83 fb 03	 cmp	 ebx, 3
  0294c	75 3e		 jne	 SHORT $LN80@Railgun_Ha@2
  0294e	8b ff		 npad	 2
$LL73@Railgun_Ha@2:

; 7026 : 			for ( ;; ) {
; 7027 : 				if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  02950	0f be 45 fd	 movsx	 eax, BYTE PTR [ebp-3]
  02954	0f be 7d ff	 movsx	 edi, BYTE PTR [ebp-1]
  02958	c1 e0 08	 shl	 eax, 8
  0295b	03 c7		 add	 eax, edi
  0295d	3b c8		 cmp	 ecx, eax
  0295f	75 08		 jne	 SHORT $LN70@Railgun_Ha@2

; 7028 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  02961	8a 42 01	 mov	 al, BYTE PTR [edx+1]
  02964	3a 45 fe	 cmp	 al, BYTE PTR [ebp-2]
  02967	74 1b		 je	 SHORT $LN95@Railgun_Ha@2
$LN70@Railgun_Ha@2:

; 7029 : 				}
; 7030 : 				if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) { 

  02969	8b c1		 mov	 eax, ecx
  0296b	c1 e8 08	 shr	 eax, 8
  0296e	3a 45 fe	 cmp	 al, BYTE PTR [ebp-2]
  02971	74 07		 je	 SHORT $LN122@Railgun_Ha@2

; 7031 : 					pbTarget++;

  02973	45		 inc	 ebp

; 7032 : 					if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  02974	3a 45 fe	 cmp	 al, BYTE PTR [ebp-2]
  02977	74 01		 je	 SHORT $LN122@Railgun_Ha@2
  02979	45		 inc	 ebp
$LN122@Railgun_Ha@2:

; 7033 : 				}
; 7034 : 				pbTarget++;

  0297a	45		 inc	 ebp

; 7035 : 				if (pbTarget > pbTargetMax) return(NULL);

  0297b	3b ee		 cmp	 ebp, esi
  0297d	76 d1		 jbe	 SHORT $LL73@Railgun_Ha@2

; 7036 : 			}

  0297f	e9 e7 03 00 00	 jmp	 $LN5@Railgun_Ha@2
$LN95@Railgun_Ha@2:

; 7028 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  02984	8d 45 fd	 lea	 eax, DWORD PTR [ebp-3]
  02987	e9 e1 03 00 00	 jmp	 $LN131@Railgun_Ha@2
$LN80@Railgun_Ha@2:

; 7037 : 		} else {
; 7038 : 		}
; 7039 : 		for ( ;; ) {
; 7040 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) ) return((pbTarget-2));

  0298c	8a 45 ff	 mov	 al, BYTE PTR [ebp-1]
  0298f	0f be 55 fe	 movsx	 edx, BYTE PTR [ebp-2]
  02993	0f be f8	 movsx	 edi, al
  02996	c1 e2 08	 shl	 edx, 8
  02999	03 d7		 add	 edx, edi
  0299b	3b ca		 cmp	 ecx, edx
  0299d	74 26		 je	 SHORT $LN97@Railgun_Ha@2
  0299f	8b d1		 mov	 edx, ecx
  029a1	c1 ea 08	 shr	 edx, 8
$LL65@Railgun_Ha@2:

; 7041 : 			if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  029a4	3a d0		 cmp	 dl, al
  029a6	74 01		 je	 SHORT $LN123@Railgun_Ha@2
  029a8	45		 inc	 ebp
$LN123@Railgun_Ha@2:

; 7042 : 			pbTarget++;

  029a9	45		 inc	 ebp

; 7043 : 			if (pbTarget > pbTargetMax) return(NULL);

  029aa	3b ee		 cmp	 ebp, esi
  029ac	0f 87 b9 03 00
	00		 ja	 $LN5@Railgun_Ha@2

; 7037 : 		} else {
; 7038 : 		}
; 7039 : 		for ( ;; ) {
; 7040 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) ) return((pbTarget-2));

  029b2	8a 45 ff	 mov	 al, BYTE PTR [ebp-1]
  029b5	0f be 7d fe	 movsx	 edi, BYTE PTR [ebp-2]
  029b9	0f be d8	 movsx	 ebx, al
  029bc	c1 e7 08	 shl	 edi, 8
  029bf	03 fb		 add	 edi, ebx
  029c1	3b cf		 cmp	 ecx, edi
  029c3	75 df		 jne	 SHORT $LL65@Railgun_Ha@2
$LN97@Railgun_Ha@2:
  029c5	8d 45 fe	 lea	 eax, DWORD PTR [ebp-2]
  029c8	e9 a0 03 00 00	 jmp	 $LN131@Railgun_Ha@2
$LN75@Railgun_Ha@2:

; 7044 : 		}
; 7045 : 
; 7046 : 	} else {
; 7047 : 		if (cbTarget<HaystackThreshold) { // This value is arbitrary (don't know how exactly), it ensures (at least must) better performance than 'Boyer_Moore_Horspool'.

  029cd	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H
  029d2	0f 83 df 00 00
	00		 jae	 $LN59@Railgun_Ha@2

; 7048 : 
; 7049 : 		pbTarget = pbTarget+cbPattern;
; 7050 : 		ulHashPattern = *(uint32_t *)(pbPattern);

  029d8	8b 0a		 mov	 ecx, DWORD PTR [edx]

; 7051 : 		SINGLET = ulHashPattern & 0xFF;
; 7052 : 		Quadruplet2nd = SINGLET<<8;

  029da	0f b6 c1	 movzx	 eax, cl
  029dd	8b d0		 mov	 edx, eax
  029df	c1 e2 08	 shl	 edx, 8
  029e2	89 54 24 28	 mov	 DWORD PTR _Quadruplet2nd$[esp+84024], edx

; 7053 : 		Quadruplet3rd = SINGLET<<16;

  029e6	8b f0		 mov	 esi, eax
  029e8	c1 e6 10	 shl	 esi, 16			; 00000010H

; 7054 : 		Quadruplet4th = SINGLET<<24;

  029eb	8b d0		 mov	 edx, eax
  029ed	03 eb		 add	 ebp, ebx
  029ef	c1 e2 18	 shl	 edx, 24			; 00000018H
  029f2	89 4c 24 1c	 mov	 DWORD PTR _ulHashPattern$[esp+84024], ecx
  029f6	89 44 24 20	 mov	 DWORD PTR tv891[esp+84024], eax
  029fa	89 74 24 24	 mov	 DWORD PTR _Quadruplet3rd$[esp+84024], esi
  029fe	89 54 24 2c	 mov	 DWORD PTR _Quadruplet4th$[esp+84024], edx
$LL58@Railgun_Ha@2:

; 7055 : 		for ( ;; ) {
; 7056 : 			AdvanceHopperGrass = 0;
; 7057 : 			ulHashTarget = *(uint32_t *)(pbTarget-cbPattern);

  02a02	8b c5		 mov	 eax, ebp
  02a04	2b c3		 sub	 eax, ebx
  02a06	8b 00		 mov	 eax, DWORD PTR [eax]
  02a08	33 ff		 xor	 edi, edi
  02a0a	89 7c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+84024], edi

; 7058 : 			if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  02a0e	3b c8		 cmp	 ecx, eax
  02a10	75 5c		 jne	 SHORT $LN56@Railgun_Ha@2

; 7059 : 				count = cbPattern-1;

  02a12	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 7060 : 				while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  02a15	85 c0		 test	 eax, eax
  02a17	74 3e		 je	 SHORT $LN117@Railgun_Ha@2

; 7059 : 				count = cbPattern-1;

  02a19	8b 4c 24 18	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+84024]
  02a1d	8b f5		 mov	 esi, ebp
  02a1f	2b c8		 sub	 ecx, eax
  02a21	2b f0		 sub	 esi, eax
  02a23	03 cb		 add	 ecx, ebx
$LL55@Railgun_Ha@2:

; 7060 : 				while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  02a25	8a 16		 mov	 dl, BYTE PTR [esi]
  02a27	88 54 24 17	 mov	 BYTE PTR tv1043[esp+84024], dl
  02a2b	38 11		 cmp	 BYTE PTR [ecx], dl
  02a2d	75 31		 jne	 SHORT $LN54@Railgun_Ha@2

; 7061 : 					if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  02a2f	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]
  02a32	03 f8		 add	 edi, eax
  02a34	3b d7		 cmp	 edx, edi
  02a36	75 16		 jne	 SHORT $LN124@Railgun_Ha@2
  02a38	0f be 54 24 17	 movsx	 edx, BYTE PTR tv1043[esp+84024]
  02a3d	39 54 24 20	 cmp	 DWORD PTR tv891[esp+84024], edx
  02a41	74 0b		 je	 SHORT $LN124@Railgun_Ha@2
  02a43	8b 7c 24 10	 mov	 edi, DWORD PTR _AdvanceHopperGrass$[esp+84024]
  02a47	47		 inc	 edi
  02a48	89 7c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+84024], edi
  02a4c	eb 04		 jmp	 SHORT $LN53@Railgun_Ha@2
$LN124@Railgun_Ha@2:
  02a4e	8b 7c 24 10	 mov	 edi, DWORD PTR _AdvanceHopperGrass$[esp+84024]
$LN53@Railgun_Ha@2:

; 7062 : 					count--;

  02a52	41		 inc	 ecx
  02a53	46		 inc	 esi
  02a54	48		 dec	 eax
  02a55	75 ce		 jne	 SHORT $LL55@Railgun_Ha@2
$LN117@Railgun_Ha@2:

; 7063 : 				}
; 7064 : 				if ( count == 0) return((pbTarget-cbPattern));

  02a57	8b c5		 mov	 eax, ebp
  02a59	2b c3		 sub	 eax, ebx
  02a5b	e9 0d 03 00 00	 jmp	 $LN131@Railgun_Ha@2
$LN54@Railgun_Ha@2:
  02a60	85 c0		 test	 eax, eax
  02a62	74 f3		 je	 SHORT $LN117@Railgun_Ha@2

; 7065 : 			} else { // The goal here: to avoid memory accesses by stressing the registers.

  02a64	8b 54 24 2c	 mov	 edx, DWORD PTR _Quadruplet4th$[esp+84024]
  02a68	8b 74 24 24	 mov	 esi, DWORD PTR _Quadruplet3rd$[esp+84024]
  02a6c	eb 32		 jmp	 SHORT $LN130@Railgun_Ha@2
$LN56@Railgun_Ha@2:

; 7066 : 				if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  02a6e	8b c8		 mov	 ecx, eax
  02a70	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  02a76	39 4c 24 28	 cmp	 DWORD PTR _Quadruplet2nd$[esp+84024], ecx
  02a7a	74 24		 je	 SHORT $LN130@Railgun_Ha@2

; 7067 : 					AdvanceHopperGrass++;
; 7068 : 					if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  02a7c	8b c8		 mov	 ecx, eax
  02a7e	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  02a84	bf 01 00 00 00	 mov	 edi, 1
  02a89	3b f1		 cmp	 esi, ecx
  02a8b	74 13		 je	 SHORT $LN130@Railgun_Ha@2

; 7069 : 						AdvanceHopperGrass++;
; 7070 : 						if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  02a8d	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  02a92	bf 02 00 00 00	 mov	 edi, 2
  02a97	3b d0		 cmp	 edx, eax
  02a99	74 05		 je	 SHORT $LN130@Railgun_Ha@2
  02a9b	bf 03 00 00 00	 mov	 edi, 3
$LN130@Railgun_Ha@2:

; 7071 : 					}
; 7072 : 				}
; 7073 : 			}
; 7074 : 			AdvanceHopperGrass++;
; 7075 : 			pbTarget = pbTarget + AdvanceHopperGrass;

  02aa0	8d 6c 2f 01	 lea	 ebp, DWORD PTR [edi+ebp+1]

; 7076 : 			if (pbTarget > pbTargetMax) return(NULL);

  02aa4	3b 6c 24 30	 cmp	 ebp, DWORD PTR _pbTargetMax$[esp+84024]
  02aa8	0f 87 bd 02 00
	00		 ja	 $LN5@Railgun_Ha@2

; 7077 : 		}

  02aae	8b 4c 24 1c	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+84024]
  02ab2	e9 4b ff ff ff	 jmp	 $LL58@Railgun_Ha@2
$LN59@Railgun_Ha@2:
  02ab7	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]

; 7078 : 
; 7079 : 		} else { //if (cbTarget<HaystackThreshold)
; 7080 : 
; 7081 : 			countSTATIC = cbPattern-2-2;
; 7082 : 
; 7083 : 			for (a=0; a < 256; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern+1;}

  02aba	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  02abf	8d 7c 24 34	 lea	 edi, DWORD PTR _bm_bc2nd$[esp+84024]
  02ac3	f3 ab		 rep stosd
  02ac5	8d 53 fc	 lea	 edx, DWORD PTR [ebx-4]

; 7084 : 			for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 

  02ac8	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  02acb	33 c0		 xor	 eax, eax
  02acd	89 54 24 10	 mov	 DWORD PTR _countSTATIC$[esp+84024], edx
  02ad1	8b 54 24 18	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+84024]
  02ad5	85 c9		 test	 ecx, ecx
  02ad7	74 0c		 je	 SHORT $LN40@Railgun_Ha@2
  02ad9	8d a4 24 00 00
	00 00		 npad	 7
$LL42@Railgun_Ha@2:
  02ae0	40		 inc	 eax
  02ae1	3b c1		 cmp	 eax, ecx
  02ae3	72 fb		 jb	 SHORT $LL42@Railgun_Ha@2
$LN40@Railgun_Ha@2:

; 7085 : 			for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=cbPattern-j; 

  02ae5	33 c0		 xor	 eax, eax
  02ae7	85 db		 test	 ebx, ebx
  02ae9	74 16		 je	 SHORT $LN37@Railgun_Ha@2
  02aeb	eb 03 8d 49 00	 npad	 5
$LL39@Railgun_Ha@2:
  02af0	0f be 34 02	 movsx	 esi, BYTE PTR [edx+eax]
  02af4	8b cb		 mov	 ecx, ebx
  02af6	2b c8		 sub	 ecx, eax
  02af8	40		 inc	 eax
  02af9	89 4c b4 34	 mov	 DWORD PTR _bm_bc2nd$[esp+esi*4+84024], ecx
  02afd	3b c3		 cmp	 eax, ebx
  02aff	72 ef		 jb	 SHORT $LL39@Railgun_Ha@2
$LN37@Railgun_Ha@2:

; 7086 : 
; 7087 : 			ulHashPattern = *(uint32_t *)(pbPattern); // First four bytes

  02b01	8b 7c 24 18	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+84024]
  02b05	8b 17		 mov	 edx, DWORD PTR [edi]
  02b07	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 7088 : 			//ulHashTarget = *(unsigned short *)(pbPattern+cbPattern-1-1); // Last two bytes
; 7089 : 		
; 7090 : 			i=0;
; 7091 : 			for (a=0; a < 256*256; a++) {bm_Horspool_Order2[a]= cbPattern-1;} // cbPattern-(Order-1) for Horspool; 'memset' if not optimized

  02b0a	0f b6 c8	 movzx	 ecx, al
  02b0d	68 00 00 01 00	 push	 65536			; 00010000H
  02b12	89 54 24 20	 mov	 DWORD PTR _ulHashPattern$[esp+84028], edx
  02b16	51		 push	 ecx
  02b17	8d 94 24 3c 48
	00 00		 lea	 edx, DWORD PTR _bm_Horspool_Order2$[esp+84032]
  02b1e	52		 push	 edx
  02b1f	33 f6		 xor	 esi, esi
  02b21	e8 00 00 00 00	 call	 _memset

; 7092 : 			for (j=0; j < cbPattern-1; j++) bm_Horspool_Order2[*(unsigned short *)(pbPattern+j)]=j; // Rightmost appearance/position is needed

  02b26	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  02b29	83 c4 0c	 add	 esp, 12			; 0000000cH
  02b2c	33 c0		 xor	 eax, eax
  02b2e	85 c9		 test	 ecx, ecx
  02b30	74 10		 je	 SHORT $LN31@Railgun_Ha@2
$LL33@Railgun_Ha@2:
  02b32	0f b7 14 07	 movzx	 edx, WORD PTR [edi+eax]
  02b36	88 84 14 34 48
	00 00		 mov	 BYTE PTR _bm_Horspool_Order2$[esp+edx+84024], al
  02b3d	40		 inc	 eax
  02b3e	3b c1		 cmp	 eax, ecx
  02b40	72 f0		 jb	 SHORT $LL33@Railgun_Ha@2
$LN31@Railgun_Ha@2:

; 7093 : 
; 7094 : 	if ( cbPattern>NeedleThreshold ) { 

  02b42	83 fb 09	 cmp	 ebx, 9
  02b45	0f 86 97 01 00
	00		 jbe	 $LN92@Railgun_Ha@2

; 7095 : 
; 7096 : 			for (a=0; a < 1<<(HashTableSize-DUMBO_HashTableShrink); a++) {bm_Hasherezade_HASH[a]= 0;} // to-do: 'memset' if not optimized

  02b4b	68 00 40 00 00	 push	 16384			; 00004000H
  02b50	8d 84 24 38 08
	00 00		 lea	 eax, DWORD PTR _bm_Hasherezade_HASH$[esp+84028]
  02b57	6a 00		 push	 0
  02b59	50		 push	 eax
  02b5a	e8 00 00 00 00	 call	 _memset

; 7097 : 			// cbPattern - Order + 1 i.e. number of BBs for 11 'fastest fox' 11-8+1=4: 'fastest ', 'astest f', 'stest fo', 'test fox'
; 7098 : #ifdef DUMBO_HasherezadeOrder8
; 7099 : 			for (j=0; j < cbPattern-8+1; j++) {

  02b5f	8d 43 f9	 lea	 eax, DWORD PTR [ebx-7]
  02b62	83 c4 0c	 add	 esp, 12			; 0000000cH
  02b65	33 c9		 xor	 ecx, ecx
  02b67	85 c0		 test	 eax, eax
  02b69	74 4b		 je	 SHORT $LN90@Railgun_Ha@2
  02b6b	eb 03 8d 49 00	 npad	 5
$LL129@Railgun_Ha@2:

; 7100 : 				hash32 = (2166136261 ^ *(uint32_t*)(pbPattern+j+0)) * 709607;
; 7101 : 				hash32B = (2166136261 ^ *(uint32_t*)(pbPattern+j+4)) * 709607;

  02b70	8b 44 0f 04	 mov	 eax, DWORD PTR [edi+ecx+4]
  02b74	8b 14 0f	 mov	 edx, DWORD PTR [edi+ecx]
  02b77	35 c5 9d 1c 81	 xor	 eax, -2128831035	; 811c9dc5H
  02b7c	81 f2 c5 9d 1c
	81		 xor	 edx, -2128831035	; 811c9dc5H
  02b82	69 c0 e7 d3 0a
	00		 imul	 eax, 709607		; 000ad3e7H
  02b88	69 d2 e7 d3 0a
	00		 imul	 edx, 709607		; 000ad3e7H

; 7102 : 				hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;

  02b8e	c1 c0 05	 rol	 eax, 5
  02b91	33 c2		 xor	 eax, edx
  02b93	69 c0 e7 d3 0a
	00		 imul	 eax, 709607		; 000ad3e7H

; 7103 : #ifdef DUMBO_HasherezadeBYTEWISE
; 7104 : 				bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]=1;

  02b99	8b d0		 mov	 edx, eax
  02b9b	c1 ea 10	 shr	 edx, 16			; 00000010H
  02b9e	33 d0		 xor	 edx, eax
  02ba0	81 e2 ff 3f 00
	00		 and	 edx, 16383		; 00003fffH
  02ba6	41		 inc	 ecx
  02ba7	8d 43 f9	 lea	 eax, DWORD PTR [ebx-7]
  02baa	c6 84 14 34 08
	00 00 01	 mov	 BYTE PTR _bm_Hasherezade_HASH$[esp+edx+84024], 1
  02bb2	3b c8		 cmp	 ecx, eax
  02bb4	72 ba		 jb	 SHORT $LL129@Railgun_Ha@2
$LN90@Railgun_Ha@2:

; 7105 : #else				
; 7106 : 				hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );
; 7107 : 				bm_Hasherezade_HASH[hash32>>3]= bm_Hasherezade_HASH[hash32>>3] | (1<<(hash32&0x7));
; 7108 : #endif
; 7109 : #else
; 7110 : 			for (j=0; j < cbPattern-4+1; j++) {
; 7111 : 				hash32 = (2166136261 ^ *(uint16_t*)(pbPattern+j+0)) * 709607;
; 7112 : 				hash32B = (2166136261 ^ *(uint16_t*)(pbPattern+j+2)) * 709607;
; 7113 : 				hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;
; 7114 : #ifdef DUMBO_HasherezadeBYTEWISE
; 7115 : 				bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]=1;
; 7116 : #else				
; 7117 : 				hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );
; 7118 : 				bm_Hasherezade_HASH[hash32>>3]= bm_Hasherezade_HASH[hash32>>3] | (1<<(hash32&0x7));
; 7119 : #endif
; 7120 : #endif
; 7121 : 			}
; 7122 : 
; 7123 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  02bb6	8b 84 24 44 48
	01 00		 mov	 eax, DWORD PTR _cbTarget$[esp+84020]
  02bbd	2b c3		 sub	 eax, ebx
  02bbf	89 44 24 20	 mov	 DWORD PTR tv751[esp+84024], eax
  02bc3	8b 44 24 10	 mov	 eax, DWORD PTR _countSTATIC$[esp+84024]
  02bc7	8d 14 2b	 lea	 edx, DWORD PTR [ebx+ebp]
  02bca	8d 9b 00 00 00
	00		 npad	 6
$LL23@Railgun_Ha@2:

; 7124 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];

  02bd0	0f b7 4c 32 fe	 movzx	 ecx, WORD PTR [edx+esi-2]
  02bd5	0f b6 8c 0c 34
	48 00 00	 movzx	 ecx, BYTE PTR _bm_Horspool_Order2$[esp+ecx+84024]

; 7125 : 
; 7126 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found

  02bdd	8d 7b fe	 lea	 edi, DWORD PTR [ebx-2]
  02be0	3b cf		 cmp	 ecx, edi
  02be2	75 40		 jne	 SHORT $LN21@Railgun_Ha@2

; 7127 : 					if ( *(uint32_t *)&pbTarget[i] == ulHashPattern) {

  02be4	8b 54 24 1c	 mov	 edx, DWORD PTR _ulHashPattern$[esp+84024]
  02be8	39 14 2e	 cmp	 DWORD PTR [esi+ebp], edx
  02beb	75 2a		 jne	 SHORT $LN17@Railgun_Ha@2

; 7129 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02bed	85 c0		 test	 eax, eax
  02bef	74 1a		 je	 SHORT $LN102@Railgun_Ha@2

; 7128 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  02bf1	8b 4c 24 18	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+84024]
  02bf5	83 c1 04	 add	 ecx, 4
  02bf8	8d 7c 2e 04	 lea	 edi, DWORD PTR [esi+ebp+4]
  02bfc	8d 64 24 00	 npad	 4
$LL19@Railgun_Ha@2:

; 7129 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02c00	8a 11		 mov	 dl, BYTE PTR [ecx]
  02c02	3a 17		 cmp	 dl, BYTE PTR [edi]
  02c04	75 0d		 jne	 SHORT $LN18@Railgun_Ha@2

; 7130 : 							count--;

  02c06	47		 inc	 edi
  02c07	41		 inc	 ecx
  02c08	48		 dec	 eax
  02c09	75 f5		 jne	 SHORT $LL19@Railgun_Ha@2
$LN102@Railgun_Ha@2:

; 7223 : 					}
; 7224 : 					if ( count == 0) return(pbTarget+i);

  02c0b	8d 04 2e	 lea	 eax, DWORD PTR [esi+ebp]
  02c0e	e9 5a 01 00 00	 jmp	 $LN131@Railgun_Ha@2
$LN18@Railgun_Ha@2:

; 7131 : 						if ( count == 0) return(pbTarget+i);

  02c13	85 c0		 test	 eax, eax
  02c15	74 f4		 je	 SHORT $LN102@Railgun_Ha@2
$LN17@Railgun_Ha@2:

; 7132 : 					}
; 7133 : 					//if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )
; 7134 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  02c17	8d 14 2b	 lea	 edx, DWORD PTR [ebx+ebp]
  02c1a	0f b6 04 32	 movzx	 eax, BYTE PTR [edx+esi]
  02c1e	8b 4c 84 34	 mov	 ecx, DWORD PTR _bm_bc2nd$[esp+eax*4+84024]
  02c22	eb 0e		 jmp	 SHORT $LN15@Railgun_Ha@2
$LN21@Railgun_Ha@2:

; 7135 : 					//else
; 7136 : 					//         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 7137 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2

  02c24	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]
  02c27	3b c8		 cmp	 ecx, eax
  02c29	74 07		 je	 SHORT $LN15@Railgun_Ha@2

; 7138 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position

  02c2b	8b c3		 mov	 eax, ebx
  02c2d	2b c1		 sub	 eax, ecx
  02c2f	8d 48 fe	 lea	 ecx, DWORD PTR [eax-2]
$LN15@Railgun_Ha@2:

; 7139 : 			
; 7140 : 				// The goal: to jump when the rightmost 8bytes (Order 8 Horspool) of window do not look like any of Needle prefixes i.e. are not to be found. This maximum jump equals cbPattern-(Order-1) or 11-(8-1)=4 for 'fastest fox' - a small one but for Needle 31 bytes the jump equals 31-(8-1)=24
; 7141 : #ifdef DUMBO_HasherezadeOrder8
; 7142 : 				if (Gulliver + (JumpThreshold) < cbPattern-(8-1)) { 

  02c32	8d 79 01	 lea	 edi, DWORD PTR [ecx+1]
  02c35	8d 43 f9	 lea	 eax, DWORD PTR [ebx-7]
  02c38	3b f8		 cmp	 edi, eax
  02c3a	73 44		 jae	 SHORT $LN13@Railgun_Ha@2

; 7143 : 					hash32 = (2166136261 ^ *(uint32_t*)(pbTarget+i+cbPattern-8+0)) * 709607;
; 7144 : 					hash32B = (2166136261 ^ *(uint32_t*)(pbTarget+i+cbPattern-8+4)) * 709607;

  02c3c	8b 44 32 fc	 mov	 eax, DWORD PTR [edx+esi-4]
  02c40	8b 7c 32 f8	 mov	 edi, DWORD PTR [edx+esi-8]
  02c44	35 c5 9d 1c 81	 xor	 eax, -2128831035	; 811c9dc5H
  02c49	81 f7 c5 9d 1c
	81		 xor	 edi, -2128831035	; 811c9dc5H
  02c4f	69 c0 e7 d3 0a
	00		 imul	 eax, 709607		; 000ad3e7H
  02c55	69 ff e7 d3 0a
	00		 imul	 edi, 709607		; 000ad3e7H

; 7145 : 					hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;

  02c5b	c1 c0 05	 rol	 eax, 5
  02c5e	33 c7		 xor	 eax, edi
  02c60	69 c0 e7 d3 0a
	00		 imul	 eax, 709607		; 000ad3e7H

; 7146 : #ifdef DUMBO_HasherezadeBYTEWISE
; 7147 : 					if ( bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]==0 )

  02c66	8b f8		 mov	 edi, eax
  02c68	c1 ef 10	 shr	 edi, 16			; 00000010H
  02c6b	33 f8		 xor	 edi, eax
  02c6d	81 e7 ff 3f 00
	00		 and	 edi, 16383		; 00003fffH
  02c73	80 bc 3c 34 08
	00 00 00	 cmp	 BYTE PTR _bm_Hasherezade_HASH$[esp+edi+84024], 0
  02c7b	75 03		 jne	 SHORT $LN13@Railgun_Ha@2

; 7148 : 						Gulliver = cbPattern-(8-1);

  02c7d	8d 4b f9	 lea	 ecx, DWORD PTR [ebx-7]
$LN13@Railgun_Ha@2:

; 7105 : #else				
; 7106 : 				hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );
; 7107 : 				bm_Hasherezade_HASH[hash32>>3]= bm_Hasherezade_HASH[hash32>>3] | (1<<(hash32&0x7));
; 7108 : #endif
; 7109 : #else
; 7110 : 			for (j=0; j < cbPattern-4+1; j++) {
; 7111 : 				hash32 = (2166136261 ^ *(uint16_t*)(pbPattern+j+0)) * 709607;
; 7112 : 				hash32B = (2166136261 ^ *(uint16_t*)(pbPattern+j+2)) * 709607;
; 7113 : 				hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;
; 7114 : #ifdef DUMBO_HasherezadeBYTEWISE
; 7115 : 				bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]=1;
; 7116 : #else				
; 7117 : 				hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );
; 7118 : 				bm_Hasherezade_HASH[hash32>>3]= bm_Hasherezade_HASH[hash32>>3] | (1<<(hash32&0x7));
; 7119 : #endif
; 7120 : #endif
; 7121 : 			}
; 7122 : 
; 7123 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  02c80	8b 7c 24 20	 mov	 edi, DWORD PTR tv751[esp+84024]

; 7149 : #else
; 7150 : 					hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );
; 7151 : 					if ( (bm_Hasherezade_HASH[hash32>>3] & (1<<(hash32&0x7))) ==0 )
; 7152 : 						Gulliver = cbPattern-(8-1);
; 7153 : #endif
; 7154 : 				}
; 7155 : #else
; 7156 : 				if (Gulliver + (JumpThreshold) < cbPattern-(4-1)) { 
; 7157 : 					hash32 = (2166136261 ^ *(uint16_t*)(pbTarget+i+cbPattern-4+0)) * 709607;
; 7158 : 					hash32B = (2166136261 ^ *(uint16_t*)(pbTarget+i+cbPattern-4+2)) * 709607;
; 7159 : 					hash32 = (hash32 ^ ROL(hash32B,5) ) * 709607;
; 7160 : #ifdef DUMBO_HasherezadeBYTEWISE
; 7161 : 					if ( bm_Hasherezade_HASH[( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 )]==0 )
; 7162 : 						Gulliver = cbPattern-(4-1);
; 7163 : #else
; 7164 : 					hash32 = ( hash32 ^ (hash32 >> 16) ) & ( (1<<(HashTableSize))-1 );
; 7165 : 					if ( (bm_Hasherezade_HASH[hash32>>3] & (1<<(hash32&0x7))) ==0 )
; 7166 : 						Gulliver = cbPattern-(4-1);
; 7167 : #endif
; 7168 : 				}
; 7169 : #endif
; 7170 : 					i = i + Gulliver;

  02c84	03 f1		 add	 esi, ecx

; 7171 : 				GlobalI++;

  02c86	83 05 00 00 00
	00 01		 add	 DWORD PTR _GlobalI, 1
  02c8d	8d 47 ff	 lea	 eax, DWORD PTR [edi-1]
  02c90	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  02c97	3b f0		 cmp	 esi, eax
  02c99	8b 44 24 10	 mov	 eax, DWORD PTR _countSTATIC$[esp+84024]
  02c9d	0f 86 2d ff ff
	ff		 jbe	 $LL23@Railgun_Ha@2
$LN10@Railgun_Ha@2:

; 7228 : 			}
; 7229 : 	} //if ( cbPattern>NeedleThreshold )
; 7230 : 
; 7231 : 			if (i == cbTarget-cbPattern) {

  02ca3	3b f7		 cmp	 esi, edi
  02ca5	0f 85 c0 00 00
	00		 jne	 $LN5@Railgun_Ha@2

; 7232 : 				if ( *(uint32_t *)&pbTarget[i] == ulHashPattern) {

  02cab	8b 4c 24 1c	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+84024]
  02caf	03 f5		 add	 esi, ebp
  02cb1	39 0e		 cmp	 DWORD PTR [esi], ecx
  02cb3	0f 85 a4 00 00
	00		 jne	 $LN127@Railgun_Ha@2

; 7233 : 					count = countSTATIC;

  02cb9	8b c8		 mov	 ecx, eax

; 7234 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02cbb	85 c0		 test	 eax, eax
  02cbd	0f 84 96 00 00
	00		 je	 $LN116@Railgun_Ha@2

; 7233 : 					count = countSTATIC;

  02cc3	8b 7c 24 18	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+84024]
  02cc7	83 c7 04	 add	 edi, 4
  02cca	8d 56 04	 lea	 edx, DWORD PTR [esi+4]
  02ccd	8d 49 00	 npad	 3
$LL3@Railgun_Ha@2:

; 7234 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  02cd0	8a 07		 mov	 al, BYTE PTR [edi]
  02cd2	3a 02		 cmp	 al, BYTE PTR [edx]
  02cd4	75 7f		 jne	 SHORT $LN2@Railgun_Ha@2

; 7235 : 						count--;

  02cd6	42		 inc	 edx
  02cd7	47		 inc	 edi
  02cd8	49		 dec	 ecx
  02cd9	75 f5		 jne	 SHORT $LL3@Railgun_Ha@2

; 7236 : 					if ( count == 0) return(pbTarget+i);

  02cdb	8b c6		 mov	 eax, esi
  02cdd	e9 8b 00 00 00	 jmp	 $LN131@Railgun_Ha@2
$LN92@Railgun_Ha@2:

; 7172 : 			}
; 7173 : 
; 7174 : 	} else { //if ( cbPattern>NeedleThreshold )
; 7175 : // Slower than pure Sunday, that's why commented (for small needles there is no much gain in choosing a bigger stride):
; 7176 : /*
; 7177 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used
; 7178 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];
; 7179 : 
; 7180 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found
; 7181 : 					if ( *(uint32_t *)&pbTarget[i] == ulHashPattern) {
; 7182 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2
; 7183 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )
; 7184 : 							count--;
; 7185 : 						if ( count == 0) return(pbTarget+i);
; 7186 : 					}
; 7187 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 7188 : 					if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )
; 7189 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];
; 7190 : 					else
; 7191 : 					         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 7192 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2
; 7193 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position
; 7194 : 
; 7195 : 				i = i + Gulliver;
; 7196 : 
; 7197 : // 32323218 Order 1 Horspool Skip-table A
; 7198 : // 01234568 Order 1 Horspool Skip-table B
; 7199 : // fa af fa af fa as st Order 2 Horspool Skip-table B
; 7200 : //  0  1  2  3  4  5  6
; 7201 : // HIKARIfast
; 7202 : // fafafast
; 7203 : //   fafafast +2 Order 1 'a' vs 't'
; 7204 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-5-1 = 2) Order 1 'a' vs 't'
; 7205 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 7206 : 
; 7207 : // 76543218 Order 1 Horspool
; 7208 : // lo on ng gp pa ac ce Order 2 Horspool
; 7209 : //  0  1  2  3  4  5  6
; 7210 : // HIKARIfast
; 7211 : // longpace
; 7212 : //   longpace +2 Order 1 'a' vs 'e'
; 7213 : //        longpace +7 = (cbPattern-(Order-1) = 8-(2-1) = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 7214 : 
; 7215 : 				GlobalI++;
; 7216 : 			}
; 7217 : */
; 7218 : 			while (i <= cbTarget-cbPattern-1) {

  02ce2	8b bc 24 44 48
	01 00		 mov	 edi, DWORD PTR _cbTarget$[esp+84020]
  02ce9	8b 44 24 10	 mov	 eax, DWORD PTR _countSTATIC$[esp+84024]
  02ced	2b fb		 sub	 edi, ebx
  02cef	89 7c 24 20	 mov	 DWORD PTR tv751[esp+84024], edi
$LL11@Railgun_Ha@2:

; 7219 : 				if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  02cf3	8b 4c 24 1c	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+84024]
  02cf7	39 0c 2e	 cmp	 DWORD PTR [esi+ebp], ecx
  02cfa	75 34		 jne	 SHORT $LN6@Railgun_Ha@2

; 7221 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  02cfc	85 c0		 test	 eax, eax
  02cfe	0f 84 07 ff ff
	ff		 je	 $LN102@Railgun_Ha@2

; 7220 : 					count = countSTATIC;

  02d04	8b 4c 24 18	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+84024]
  02d08	83 c1 04	 add	 ecx, 4
  02d0b	8d 7c 2e 04	 lea	 edi, DWORD PTR [esi+ebp+4]
  02d0f	90		 npad	 1
$LL8@Railgun_Ha@2:

; 7221 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  02d10	8a 11		 mov	 dl, BYTE PTR [ecx]
  02d12	3a 17		 cmp	 dl, BYTE PTR [edi]
  02d14	75 0a		 jne	 SHORT $LN7@Railgun_Ha@2

; 7222 : 						count--;

  02d16	47		 inc	 edi
  02d17	41		 inc	 ecx
  02d18	48		 dec	 eax
  02d19	75 f5		 jne	 SHORT $LL8@Railgun_Ha@2

; 7223 : 					}
; 7224 : 					if ( count == 0) return(pbTarget+i);

  02d1b	8d 04 2e	 lea	 eax, DWORD PTR [esi+ebp]
  02d1e	eb 4d		 jmp	 SHORT $LN131@Railgun_Ha@2
$LN7@Railgun_Ha@2:
  02d20	85 c0		 test	 eax, eax
  02d22	0f 84 e3 fe ff
	ff		 je	 $LN102@Railgun_Ha@2
  02d28	8b 7c 24 20	 mov	 edi, DWORD PTR tv751[esp+84024]
  02d2c	8b 44 24 10	 mov	 eax, DWORD PTR _countSTATIC$[esp+84024]
$LN6@Railgun_Ha@2:

; 7225 : 				}
; 7226 : 				i= i + bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  02d30	8d 0c 2e	 lea	 ecx, DWORD PTR [esi+ebp]
  02d33	0f b6 14 19	 movzx	 edx, BYTE PTR [ecx+ebx]
  02d37	03 74 94 34	 add	 esi, DWORD PTR _bm_bc2nd$[esp+edx*4+84024]

; 7227 : 				GlobalI++;

  02d3b	83 05 00 00 00
	00 01		 add	 DWORD PTR _GlobalI, 1
  02d42	8d 4f ff	 lea	 ecx, DWORD PTR [edi-1]
  02d45	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  02d4c	3b f1		 cmp	 esi, ecx
  02d4e	76 a3		 jbe	 SHORT $LL11@Railgun_Ha@2

; 7172 : 			}
; 7173 : 
; 7174 : 	} else { //if ( cbPattern>NeedleThreshold )
; 7175 : // Slower than pure Sunday, that's why commented (for small needles there is no much gain in choosing a bigger stride):
; 7176 : /*
; 7177 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used
; 7178 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];
; 7179 : 
; 7180 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found
; 7181 : 					if ( *(uint32_t *)&pbTarget[i] == ulHashPattern) {
; 7182 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2
; 7183 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )
; 7184 : 							count--;
; 7185 : 						if ( count == 0) return(pbTarget+i);
; 7186 : 					}
; 7187 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 7188 : 					if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )
; 7189 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];
; 7190 : 					else
; 7191 : 					         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 7192 : 				} else if ( Gulliver != cbPattern-1 ) // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2
; 7193 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position
; 7194 : 
; 7195 : 				i = i + Gulliver;
; 7196 : 
; 7197 : // 32323218 Order 1 Horspool Skip-table A
; 7198 : // 01234568 Order 1 Horspool Skip-table B
; 7199 : // fa af fa af fa as st Order 2 Horspool Skip-table B
; 7200 : //  0  1  2  3  4  5  6
; 7201 : // HIKARIfast
; 7202 : // fafafast
; 7203 : //   fafafast +2 Order 1 'a' vs 't'
; 7204 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-5-1 = 2) Order 1 'a' vs 't'
; 7205 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 7206 : 
; 7207 : // 76543218 Order 1 Horspool
; 7208 : // lo on ng gp pa ac ce Order 2 Horspool
; 7209 : //  0  1  2  3  4  5  6
; 7210 : // HIKARIfast
; 7211 : // longpace
; 7212 : //   longpace +2 Order 1 'a' vs 'e'
; 7213 : //        longpace +7 = (cbPattern-(Order-1) = 8-(2-1) = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 7214 : 
; 7215 : 				GlobalI++;
; 7216 : 			}
; 7217 : */
; 7218 : 			while (i <= cbTarget-cbPattern-1) {

  02d50	e9 4e ff ff ff	 jmp	 $LN10@Railgun_Ha@2
$LN2@Railgun_Ha@2:

; 7236 : 					if ( count == 0) return(pbTarget+i);

  02d55	85 c9		 test	 ecx, ecx
  02d57	75 04		 jne	 SHORT $LN127@Railgun_Ha@2
$LN116@Railgun_Ha@2:
  02d59	8b c6		 mov	 eax, esi
  02d5b	eb 10		 jmp	 SHORT $LN131@Railgun_Ha@2
$LN127@Railgun_Ha@2:

; 7237 : 				}
; 7238 : 				GlobalI++;

  02d5d	83 05 00 00 00
	00 01		 add	 DWORD PTR _GlobalI, 1
  02d64	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
$LN5@Railgun_Ha@2:

; 7239 : 			}
; 7240 : 			return(NULL);

  02d6b	33 c0		 xor	 eax, eax
$LN131@Railgun_Ha@2:

; 7241 : 
; 7242 : 		} //if (cbTarget<HaystackThreshold)
; 7243 : 	} //if ( cbPattern<4 )
; 7244 : }

  02d6d	8b 8c 24 34 48
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+84024]
  02d74	5f		 pop	 edi
  02d75	5e		 pop	 esi
  02d76	5d		 pop	 ebp
  02d77	5b		 pop	 ebx
  02d78	33 cc		 xor	 ecx, esp
  02d7a	e8 00 00 00 00	 call	 @__security_check_cookie@4
  02d7f	81 c4 28 48 01
	00		 add	 esp, 84008		; 00014828H
  02d85	c3		 ret	 0
_Railgun_Hasherezade_O8_BYTE ENDP
_TEXT	ENDS
PUBLIC	_cbTarget$GSCopy$
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7Elsiane_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_AdvanceHopperGrass$ = -67628				; size = 4
_pbPattern$GSCopy$ = -67624				; size = 4
tv927 = -67617						; size = 1
tv665 = -67616						; size = 4
_pbTargetMax$ = -67616					; size = 4
tv794 = -67612						; size = 4
_countSTATIC$ = -67612					; size = 4
_ulHashPattern$ = -67608				; size = 4
_cbTarget$GSCopy$ = -67604				; size = 4
_Quadruplet2nd$ = -67604				; size = 4
tv1436 = -67600						; size = 4
tv1434 = -67600						; size = 4
_Quadruplet4th$ = -67600				; size = 4
_Quadruplet3rd$ = -67596				; size = 4
_bm_bc2nd$ = -67592					; size = 1024
_bm_bc$ = -66568					; size = 1024
_bm_Sunday_Order2$ = -65544				; size = 65536
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7Elsiane_count_hits PROC

; 7318 : {

  02d90	55		 push	 ebp
  02d91	8b ec		 mov	 ebp, esp
  02d93	83 e4 f8	 and	 esp, -8			; fffffff8H
  02d96	b8 2c 08 01 00	 mov	 eax, 67628		; 0001082cH
  02d9b	e8 00 00 00 00	 call	 __chkstk
  02da0	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  02da5	33 c4		 xor	 eax, esp
  02da7	89 84 24 28 08
	01 00		 mov	 DWORD PTR __$ArrayPad$[esp+67628], eax
  02dae	8b 45 10	 mov	 eax, DWORD PTR _cbTarget$[ebp]
  02db1	8b 4d 0c	 mov	 ecx, DWORD PTR _pbPattern$[ebp]
  02db4	53		 push	 ebx

; 7319 :     char * pbTargetMax = pbTarget + cbTarget;
; 7320 :     register unsigned long ulHashPattern;
; 7321 :     register unsigned long ulHashTarget;
; 7322 :     //unsigned long count; //r.6+
; 7323 :     signed long count;
; 7324 :     //unsigned long countSTATIC; //r.6+
; 7325 :     signed long countSTATIC;
; 7326 : //  unsigned long countRemainder;
; 7327 : 
; 7328 : /*
; 7329 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 7330 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 7331 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 7332 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 7333 : */
; 7334 :     unsigned char SINGLET;
; 7335 :     unsigned long Quadruplet2nd;
; 7336 :     unsigned long Quadruplet3rd;
; 7337 :     unsigned long Quadruplet4th;
; 7338 : 
; 7339 :     unsigned long  AdvanceHopperGrass;
; 7340 : 
; 7341 :     long i; //BMH needed
; 7342 :     int a, j;
; 7343 :     unsigned int bm_bc[ASIZE]; //BMH needed
; 7344 :     //signed int bm_bc2nd[ASIZE]; //BMS needed
; 7345 :     unsigned int bm_bc2nd[ASIZE]; //BMS needed
; 7346 :     unsigned char bm_Sunday_Order2[ASIZE*ASIZE]; //BMHSS(Elsiane) needed, of course those 65536 bytes are scary in next revision reduce them to 8192 i.e. bitwise
; 7347 : 
; 7348 :     unsigned char ch; //BMH needed
; 7349 :     unsigned long chchchch; //BMH needed
; 7350 :     unsigned short chchchchSHORT; //BMH needed
; 7351 :     //unsigned char * chPTR;
; 7352 : //    unsigned char lastch, firstch; //BMH needed
; 7353 : 
; 7354 :     if (cbPattern > cbTarget)

  02db5	8b 5d 14	 mov	 ebx, DWORD PTR _cbPattern$[ebp]
  02db8	56		 push	 esi
  02db9	57		 push	 edi
  02dba	8b 7d 08	 mov	 edi, DWORD PTR _pbTarget$[ebp]
  02dbd	8d 14 38	 lea	 edx, DWORD PTR [eax+edi]
  02dc0	89 4c 24 10	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+67640], ecx

; 7536 :                count--;

  02dc4	89 44 24 24	 mov	 DWORD PTR _cbTarget$GSCopy$[esp+67640], eax
  02dc8	89 54 24 18	 mov	 DWORD PTR _pbTargetMax$[esp+67640], edx
  02dcc	3b d8		 cmp	 ebx, eax
  02dce	0f 87 29 04 00
	00		 ja	 $LN165@Railgun_Qu@9

; 7355 :         return(NULL);
; 7356 : 
; 7357 : // Doesn't work when cbPattern = 1
; 7358 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 7359 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  02dd4	83 fb 04	 cmp	 ebx, 4
  02dd7	0f 83 ac 00 00
	00		 jae	 $LN67@Railgun_Qu@9

; 7360 :         pbTarget = pbTarget+cbPattern;
; 7361 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  02ddd	0f be 31	 movsx	 esi, BYTE PTR [ecx]
  02de0	0f be 44 19 ff	 movsx	 eax, BYTE PTR [ecx+ebx-1]
  02de5	c1 e6 08	 shl	 esi, 8
  02de8	03 fb		 add	 edi, ebx
  02dea	03 c6		 add	 eax, esi

; 7362 : //        countSTATIC = cbPattern-2;
; 7363 : 
; 7364 : if ( cbPattern==3) {

  02dec	83 fb 03	 cmp	 ebx, 3
  02def	75 52		 jne	 SHORT $LN129@Railgun_Qu@9
  02df1	8b d0		 mov	 edx, eax
  02df3	c1 ea 08	 shr	 edx, 8
  02df6	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL65@Railgun_Qu@9:

; 7365 :     for ( ;; )
; 7366 :     {
; 7367 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  02e00	0f be 77 fd	 movsx	 esi, BYTE PTR [edi-3]
  02e04	0f be 5f ff	 movsx	 ebx, BYTE PTR [edi-1]
  02e08	c1 e6 08	 shl	 esi, 8
  02e0b	03 f3		 add	 esi, ebx
  02e0d	3b c6		 cmp	 eax, esi
  02e0f	75 0e		 jne	 SHORT $LN62@Railgun_Qu@9

; 7368 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));

  02e11	8a 59 01	 mov	 bl, BYTE PTR [ecx+1]
  02e14	3a 5f fe	 cmp	 bl, BYTE PTR [edi-2]
  02e17	75 06		 jne	 SHORT $LN62@Railgun_Qu@9
  02e19	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN62@Railgun_Qu@9:

; 7369 :         }
; 7370 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  02e1f	3a 57 fe	 cmp	 dl, BYTE PTR [edi-2]
  02e22	74 01		 je	 SHORT $LN61@Railgun_Qu@9
  02e24	47		 inc	 edi
$LN61@Railgun_Qu@9:

; 7371 :         pbTarget++;

  02e25	47		 inc	 edi

; 7372 :         if (pbTarget > pbTargetMax)

  02e26	3b 7c 24 18	 cmp	 edi, DWORD PTR _pbTargetMax$[esp+67640]
  02e2a	76 d4		 jbe	 SHORT $LL65@Railgun_Qu@9

; 7591 : 
; 7592 :     return(NULL);

  02e2c	33 c0		 xor	 eax, eax

; 7593 : } //if (cbTarget<961)
; 7594 : } //if ( cbPattern<4)
; 7595 : }

  02e2e	5f		 pop	 edi
  02e2f	5e		 pop	 esi
  02e30	5b		 pop	 ebx
  02e31	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  02e38	33 cc		 xor	 ecx, esp
  02e3a	e8 00 00 00 00	 call	 @__security_check_cookie@4
  02e3f	8b e5		 mov	 esp, ebp
  02e41	5d		 pop	 ebp
  02e42	c3		 ret	 0
$LN129@Railgun_Qu@9:

; 7373 :             return(NULL);

  02e43	8b c8		 mov	 ecx, eax
  02e45	c1 e9 08	 shr	 ecx, 8
  02e48	eb 06 8d 9b 00
	00 00 00	 npad	 8
$LL58@Railgun_Qu@9:

; 7374 :     }
; 7375 : } else {
; 7376 : }
; 7377 :     for ( ;; )
; 7378 :     {
; 7379 :         // The line below gives for 'cbPattern'>=1:
; 7380 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 7381 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 7382 : /*
; 7383 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 7384 :             return((long)(pbTarget-cbPattern));
; 7385 : */
; 7386 : 
; 7387 :         // The fragment below gives for 'cbPattern'>=2:
; 7388 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 7389 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 7390 : 
; 7391 : /*
; 7392 : //For 2 and 3 [
; 7393 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 7394 : //         count = countSTATIC;
; 7395 :          count = cbPattern-2;
; 7396 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7397 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 7398 :                count--;
; 7399 :          }
; 7400 :          if ( count == 0) return((pbTarget-cbPattern));
; 7401 :         }
; 7402 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 7403 : //For 2 and 3 ]
; 7404 : */
; 7405 : 
; 7406 : 
; 7407 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  02e50	0f be 77 fe	 movsx	 esi, BYTE PTR [edi-2]
  02e54	0f be 5f ff	 movsx	 ebx, BYTE PTR [edi-1]
  02e58	c1 e6 08	 shl	 esi, 8
  02e5b	03 f3		 add	 esi, ebx
  02e5d	3b c6		 cmp	 eax, esi
  02e5f	75 06		 jne	 SHORT $LN56@Railgun_Qu@9

; 7408 :             Railgunhits++; //return((pbTarget-2));

  02e61	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN56@Railgun_Qu@9:

; 7409 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  02e67	3a 4f ff	 cmp	 cl, BYTE PTR [edi-1]
  02e6a	74 01		 je	 SHORT $LN55@Railgun_Qu@9
  02e6c	47		 inc	 edi
$LN55@Railgun_Qu@9:

; 7410 : 
; 7411 : 
; 7412 :         // The fragment below gives for 'cbPattern'>=2:
; 7413 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 7414 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 7415 : /*
; 7416 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 7417 :          count = countSTATIC>>2;
; 7418 :          countRemainder = countSTATIC % 4;
; 7419 : 
; 7420 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 7421 :                count--;
; 7422 :          }
; 7423 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 7424 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 7425 :                countRemainder--;
; 7426 :          }
; 7427 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 7428 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 7429 :          //}
; 7430 :         }
; 7431 : */
; 7432 : 
; 7433 :         pbTarget++;

  02e6d	47		 inc	 edi

; 7434 :         if (pbTarget > pbTargetMax)

  02e6e	3b fa		 cmp	 edi, edx
  02e70	76 de		 jbe	 SHORT $LL58@Railgun_Qu@9

; 7591 : 
; 7592 :     return(NULL);

  02e72	33 c0		 xor	 eax, eax

; 7593 : } //if (cbTarget<961)
; 7594 : } //if ( cbPattern<4)
; 7595 : }

  02e74	5f		 pop	 edi
  02e75	5e		 pop	 esi
  02e76	5b		 pop	 ebx
  02e77	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  02e7e	33 cc		 xor	 ecx, esp
  02e80	e8 00 00 00 00	 call	 @__security_check_cookie@4
  02e85	8b e5		 mov	 esp, ebp
  02e87	5d		 pop	 ebp
  02e88	c3		 ret	 0
$LN67@Railgun_Qu@9:

; 7435 :             return(NULL);
; 7436 :     }
; 7437 : } else { //if ( cbPattern<4)
; 7438 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  02e89	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H
  02e8e	0f 83 13 01 00
	00		 jae	 $LN52@Railgun_Qu@9

; 7439 : {
; 7440 :         pbTarget = pbTarget+cbPattern;
; 7441 :         ulHashPattern = *(unsigned long *)(pbPattern);

  02e94	8b 01		 mov	 eax, DWORD PTR [ecx]
  02e96	89 44 24 20	 mov	 DWORD PTR _ulHashPattern$[esp+67640], eax

; 7442 : //        countSTATIC = cbPattern-1;
; 7443 : 
; 7444 :     //SINGLET = *(char *)(pbPattern);
; 7445 :     SINGLET = ulHashPattern & 0xFF;
; 7446 :     Quadruplet2nd = SINGLET<<8;

  02e9a	0f b6 c0	 movzx	 eax, al
  02e9d	8b f0		 mov	 esi, eax

; 7447 :     Quadruplet3rd = SINGLET<<16;

  02e9f	8b d0		 mov	 edx, eax
  02ea1	03 fb		 add	 edi, ebx
  02ea3	c1 e6 08	 shl	 esi, 8
  02ea6	c1 e2 10	 shl	 edx, 16			; 00000010H
  02ea9	89 44 24 1c	 mov	 DWORD PTR tv794[esp+67640], eax

; 7448 :     Quadruplet4th = SINGLET<<24;

  02ead	c1 e0 18	 shl	 eax, 24			; 00000018H
  02eb0	89 7d 08	 mov	 DWORD PTR _pbTarget$[ebp], edi
  02eb3	89 74 24 24	 mov	 DWORD PTR _Quadruplet2nd$[esp+67640], esi
  02eb7	89 54 24 2c	 mov	 DWORD PTR _Quadruplet3rd$[esp+67640], edx
  02ebb	89 44 24 28	 mov	 DWORD PTR _Quadruplet4th$[esp+67640], eax
  02ebf	eb 04		 jmp	 SHORT $LN51@Railgun_Qu@9
$LL146@Railgun_Qu@9:
  02ec1	8b 74 24 24	 mov	 esi, DWORD PTR _Quadruplet2nd$[esp+67640]
$LN51@Railgun_Qu@9:

; 7449 : 
; 7450 :     for ( ;; )
; 7451 :     {
; 7452 : 	AdvanceHopperGrass = 0;
; 7453 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  02ec5	8b c7		 mov	 eax, edi
  02ec7	2b c3		 sub	 eax, ebx
  02ec9	8b 00		 mov	 eax, DWORD PTR [eax]
  02ecb	c7 44 24 0c 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], 0

; 7454 : 
; 7455 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  02ed3	39 44 24 20	 cmp	 DWORD PTR _ulHashPattern$[esp+67640], eax
  02ed7	75 5c		 jne	 SHORT $LN49@Railgun_Qu@9

; 7456 : //         count = countSTATIC;
; 7457 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7458 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 7459 : //               count--;
; 7460 : //         }
; 7461 :          count = cbPattern-1;

  02ed9	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 7462 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  02edc	85 c0		 test	 eax, eax
  02ede	74 4d		 je	 SHORT $LN115@Railgun_Qu@9

; 7456 : //         count = countSTATIC;
; 7457 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7458 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 7459 : //               count--;
; 7460 : //         }
; 7461 :          count = cbPattern-1;

  02ee0	8b f7		 mov	 esi, edi
  02ee2	2b c8		 sub	 ecx, eax
  02ee4	2b f0		 sub	 esi, eax
  02ee6	03 cb		 add	 ecx, ebx
$LN48@Railgun_Qu@9:

; 7462 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  02ee8	8a 16		 mov	 dl, BYTE PTR [esi]
  02eea	88 54 24 17	 mov	 BYTE PTR tv927[esp+67640], dl
  02eee	38 11		 cmp	 BYTE PTR [ecx], dl
  02ef0	75 30		 jne	 SHORT $LN47@Railgun_Qu@9

; 7463 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  02ef2	8b 7c 24 0c	 mov	 edi, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  02ef6	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]
  02ef9	03 f8		 add	 edi, eax
  02efb	3b d7		 cmp	 edx, edi
  02efd	75 0f		 jne	 SHORT $LN46@Railgun_Qu@9
  02eff	0f be 54 24 17	 movsx	 edx, BYTE PTR tv927[esp+67640]
  02f04	39 54 24 1c	 cmp	 DWORD PTR tv794[esp+67640], edx
  02f08	74 04		 je	 SHORT $LN46@Railgun_Qu@9
  02f0a	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+67640]
$LN46@Railgun_Qu@9:

; 7464 :                count--;

  02f0e	41		 inc	 ecx
  02f0f	46		 inc	 esi
  02f10	48		 dec	 eax
  02f11	75 d5		 jne	 SHORT $LN48@Railgun_Qu@9

; 7465 :          }
; 7466 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  02f13	8b 4c 24 10	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  02f17	8b 7d 08	 mov	 edi, DWORD PTR _pbTarget$[ebp]
  02f1a	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 7467 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  02f20	eb 59		 jmp	 SHORT $LN41@Railgun_Qu@9
$LN47@Railgun_Qu@9:

; 7465 :          }
; 7466 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  02f22	85 c0		 test	 eax, eax
  02f24	75 4e		 jne	 SHORT $LN144@Railgun_Qu@9
  02f26	8b 4c 24 10	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  02f2a	8b 7d 08	 mov	 edi, DWORD PTR _pbTarget$[ebp]
$LN115@Railgun_Qu@9:
  02f2d	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 7467 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  02f33	eb 46		 jmp	 SHORT $LN41@Railgun_Qu@9
$LN49@Railgun_Qu@9:

; 7468 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  02f35	8b d0		 mov	 edx, eax
  02f37	81 e2 00 ff 00
	00		 and	 edx, 65280		; 0000ff00H
  02f3d	3b f2		 cmp	 esi, edx
  02f3f	74 3a		 je	 SHORT $LN41@Railgun_Qu@9

; 7469 :          AdvanceHopperGrass++;
; 7470 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  02f41	8b d0		 mov	 edx, eax
  02f43	81 e2 00 00 ff
	00		 and	 edx, 16711680		; 00ff0000H
  02f49	c7 44 24 0c 01
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], 1
  02f51	39 54 24 2c	 cmp	 DWORD PTR _Quadruplet3rd$[esp+67640], edx
  02f55	74 24		 je	 SHORT $LN41@Railgun_Qu@9

; 7471 :               AdvanceHopperGrass++;
; 7472 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  02f57	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  02f5c	c7 44 24 0c 02
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], 2
  02f64	39 44 24 28	 cmp	 DWORD PTR _Quadruplet4th$[esp+67640], eax
  02f68	74 11		 je	 SHORT $LN41@Railgun_Qu@9
  02f6a	c7 44 24 0c 03
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], 3
  02f72	eb 07		 jmp	 SHORT $LN41@Railgun_Qu@9
$LN144@Railgun_Qu@9:
  02f74	8b 7d 08	 mov	 edi, DWORD PTR _pbTarget$[ebp]
  02f77	8b 4c 24 10	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
$LN41@Railgun_Qu@9:

; 7473 :          }
; 7474 :     }
; 7475 : 	}
; 7476 : 
; 7477 : 	AdvanceHopperGrass++;
; 7478 : 
; 7479 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  02f7b	8b 44 24 0c	 mov	 eax, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  02f7f	8d 7c 07 01	 lea	 edi, DWORD PTR [edi+eax+1]
  02f83	89 7d 08	 mov	 DWORD PTR _pbTarget$[ebp], edi

; 7480 :         if (pbTarget > pbTargetMax)

  02f86	3b 7c 24 18	 cmp	 edi, DWORD PTR _pbTargetMax$[esp+67640]
  02f8a	0f 86 31 ff ff
	ff		 jbe	 $LL146@Railgun_Qu@9

; 7591 : 
; 7592 :     return(NULL);

  02f90	33 c0		 xor	 eax, eax

; 7593 : } //if (cbTarget<961)
; 7594 : } //if ( cbPattern<4)
; 7595 : }

  02f92	5f		 pop	 edi
  02f93	5e		 pop	 esi
  02f94	5b		 pop	 ebx
  02f95	8b 8c 24 28 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67628]
  02f9c	33 cc		 xor	 ecx, esp
  02f9e	e8 00 00 00 00	 call	 @__security_check_cookie@4
  02fa3	8b e5		 mov	 esp, ebp
  02fa5	5d		 pop	 ebp
  02fa6	c3		 ret	 0
$LN52@Railgun_Qu@9:

; 7481 :             return(NULL);
; 7482 :     }
; 7483 : } else { //if (cbTarget<961)
; 7484 :         //countSTATIC = cbPattern-2; //r.6+
; 7485 :         //countSTATIC = cbPattern-2-3;
; 7486 :         //countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!
; 7487 :         //countSTATIC = cbPattern-2-3; // r.7- At last no recompared bytes in-between chars
; 7488 :         countSTATIC = cbPattern-2-2; // r.7 

  02fa7	8d 4b fc	 lea	 ecx, DWORD PTR [ebx-4]
  02faa	89 4c 24 1c	 mov	 DWORD PTR _countSTATIC$[esp+67640], ecx
  02fae	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]

; 7489 : 
; 7490 : 
; 7491 :     /* Preprocessing */
; 7492 : //    for (a=0; a < ASIZE; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=-1;}
; 7493 :     for (a=0; a < ASIZE; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern+1;}

  02fb1	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  02fb6	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc2nd$[esp+67640]
  02fba	f3 ab		 rep stosd
  02fbc	8b c3		 mov	 eax, ebx
  02fbe	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  02fc3	8d bc 24 30 04
	00 00		 lea	 edi, DWORD PTR _bm_bc$[esp+67640]
  02fca	f3 ab		 rep stosd

; 7494 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 

  02fcc	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  02fd0	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  02fd3	33 c0		 xor	 eax, eax
  02fd5	85 c9		 test	 ecx, ecx
  02fd7	74 1c		 je	 SHORT $LN33@Railgun_Qu@9
  02fd9	8d a4 24 00 00
	00 00		 npad	 7
$LL35@Railgun_Qu@9:
  02fe0	0f be 34 07	 movsx	 esi, BYTE PTR [edi+eax]
  02fe4	8b d3		 mov	 edx, ebx
  02fe6	2b d0		 sub	 edx, eax
  02fe8	4a		 dec	 edx
  02fe9	40		 inc	 eax
  02fea	89 94 b4 30 04
	00 00		 mov	 DWORD PTR _bm_bc$[esp+esi*4+67640], edx
  02ff1	3b c1		 cmp	 eax, ecx
  02ff3	72 eb		 jb	 SHORT $LL35@Railgun_Qu@9
$LN33@Railgun_Qu@9:

; 7495 : //    for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=j; 
; 7496 :     for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=cbPattern-j; 

  02ff5	33 c0		 xor	 eax, eax
  02ff7	85 db		 test	 ebx, ebx
  02ff9	74 16		 je	 SHORT $LN30@Railgun_Qu@9
  02ffb	eb 03 8d 49 00	 npad	 5
$LL32@Railgun_Qu@9:
  03000	0f be 14 07	 movsx	 edx, BYTE PTR [edi+eax]
  03004	8b cb		 mov	 ecx, ebx
  03006	2b c8		 sub	 ecx, eax
  03008	40		 inc	 eax
  03009	89 4c 94 30	 mov	 DWORD PTR _bm_bc2nd$[esp+edx*4+67640], ecx
  0300d	3b c3		 cmp	 eax, ebx
  0300f	72 ef		 jb	 SHORT $LL32@Railgun_Qu@9
$LN30@Railgun_Qu@9:

; 7497 : 
; 7498 : 
; 7499 : // Elsiane [
; 7500 :     for (a=0; a < ASIZE*ASIZE; a++) {bm_Sunday_Order2[a]= 0;}

  03011	68 00 00 01 00	 push	 65536			; 00010000H
  03016	8d 84 24 34 08
	00 00		 lea	 eax, DWORD PTR _bm_Sunday_Order2$[esp+67644]
  0301d	6a 00		 push	 0
  0301f	50		 push	 eax
  03020	e8 00 00 00 00	 call	 _memset
  03025	83 c4 0c	 add	 esp, 12			; 0000000cH

; 7501 : 
; 7502 :     // alfalfa 7 long 6 BBs (al lf fa al lf fa) 3 distinct BBs (al lf fa) 
; 7503 :     // fast 4 0-1-2 fa as st
; 7504 :     //for (j=0; j < cbPattern-1; j++) bm_Sunday_Order2[*(unsigned short *)(pbPattern+j)]=1;
; 7505 : 
; 7506 : //The idea here is to use Order 2 of Sunday's approach:
; 7507 : //It takes all rows and columns containing a char from the pattern to be marked (as 1 i.e. active)
; 7508 : //   000 001 002 003 ...   A ... 255
; 7509 : //000                      * 
; 7510 : //001                      *
; 7511 : //002                      *
; 7512 : //003                      *
; 7513 : //...                      *
; 7514 : //  A  *   *   *   *   *   *   *   *  
; 7515 : //...                      *
; 7516 : //255                      *
; 7517 :     for (j=0; j < cbPattern; j++) 

  03028	33 f6		 xor	 esi, esi
  0302a	85 db		 test	 ebx, ebx
  0302c	74 36		 je	 SHORT $LN24@Railgun_Qu@9
  0302e	8b ff		 npad	 2
$LL26@Railgun_Qu@9:
  03030	0f be 04 37	 movsx	 eax, BYTE PTR [edi+esi]

; 7518 : 	  for (a=0; a < ASIZE; a++)

  03034	8b c8		 mov	 ecx, eax
  03036	c1 e1 08	 shl	 ecx, 8
  03039	8d 8c 0c 30 08
	00 00		 lea	 ecx, DWORD PTR _bm_Sunday_Order2$[esp+ecx+67640]
  03040	8d 84 04 30 08
	00 00		 lea	 eax, DWORD PTR _bm_Sunday_Order2$[esp+eax+67640]
  03047	ba 00 01 00 00	 mov	 edx, 256		; 00000100H
  0304c	8d 64 24 00	 npad	 4
$LL23@Railgun_Qu@9:

; 7519 :               { bm_Sunday_Order2[(a<<8) + pbPattern[j]]=1;  // columns filling

  03050	c6 00 01	 mov	 BYTE PTR [eax], 1

; 7520 :                 bm_Sunday_Order2[(pbPattern[j]<<8) + a]=1; // rows filling

  03053	c6 01 01	 mov	 BYTE PTR [ecx], 1
  03056	05 00 01 00 00	 add	 eax, 256		; 00000100H
  0305b	41		 inc	 ecx
  0305c	4a		 dec	 edx
  0305d	75 f1		 jne	 SHORT $LL23@Railgun_Qu@9

; 7501 : 
; 7502 :     // alfalfa 7 long 6 BBs (al lf fa al lf fa) 3 distinct BBs (al lf fa) 
; 7503 :     // fast 4 0-1-2 fa as st
; 7504 :     //for (j=0; j < cbPattern-1; j++) bm_Sunday_Order2[*(unsigned short *)(pbPattern+j)]=1;
; 7505 : 
; 7506 : //The idea here is to use Order 2 of Sunday's approach:
; 7507 : //It takes all rows and columns containing a char from the pattern to be marked (as 1 i.e. active)
; 7508 : //   000 001 002 003 ...   A ... 255
; 7509 : //000                      * 
; 7510 : //001                      *
; 7511 : //002                      *
; 7512 : //003                      *
; 7513 : //...                      *
; 7514 : //  A  *   *   *   *   *   *   *   *  
; 7515 : //...                      *
; 7516 : //255                      *
; 7517 :     for (j=0; j < cbPattern; j++) 

  0305f	46		 inc	 esi
  03060	3b f3		 cmp	 esi, ebx
  03062	72 cc		 jb	 SHORT $LL26@Railgun_Qu@9
$LN24@Railgun_Qu@9:

; 7521 : 	      }
; 7522 : // Elsiane ]
; 7523 : 
; 7524 : 
; 7525 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 7526 : 
; 7527 :     AdvanceHopperGrass = 0;
; 7528 :     i=0;
; 7529 :     while (i <= cbTarget-cbPattern-1-1) {

  03064	8b 4c 24 24	 mov	 ecx, DWORD PTR _cbTarget$GSCopy$[esp+67640]
  03068	8b 17		 mov	 edx, DWORD PTR [edi]
  0306a	33 c0		 xor	 eax, eax
  0306c	2b cb		 sub	 ecx, ebx
  0306e	89 54 24 20	 mov	 DWORD PTR _ulHashPattern$[esp+67640], edx
  03072	89 44 24 0c	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+67640], eax
  03076	89 4c 24 18	 mov	 DWORD PTR tv665[esp+67640], ecx
  0307a	8d 9b 00 00 00
	00		 npad	 6
$LL20@Railgun_Qu@9:

; 7530 : //         ulHashTarget=*(unsigned long *)&pbTarget[i];
; 7531 : //         if ( ulHashTarget == ulHashPattern)
; 7532 :          if ( *(unsigned long *)&pbTarget[i] == ulHashPattern)

  03080	8b 4c 24 20	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+67640]
  03084	8b 55 08	 mov	 edx, DWORD PTR _pbTarget$[ebp]
  03087	39 0c 10	 cmp	 DWORD PTR [eax+edx], ecx
  0308a	75 2b		 jne	 SHORT $LN15@Railgun_Qu@9

; 7533 :              {
; 7534 :          count = countSTATIC;

  0308c	8b 7c 24 1c	 mov	 edi, DWORD PTR _countSTATIC$[esp+67640]

; 7535 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  03090	85 ff		 test	 edi, edi
  03092	74 1d		 je	 SHORT $LN114@Railgun_Qu@9

; 7533 :              {
; 7534 :          count = countSTATIC;

  03094	8b 4c 24 10	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  03098	83 c1 04	 add	 ecx, 4
  0309b	8d 74 10 04	 lea	 esi, DWORD PTR [eax+edx+4]
  0309f	90		 npad	 1
$LL17@Railgun_Qu@9:

; 7535 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  030a0	8a 11		 mov	 dl, BYTE PTR [ecx]
  030a2	3a 16		 cmp	 dl, BYTE PTR [esi]
  030a4	75 07		 jne	 SHORT $LN16@Railgun_Qu@9

; 7536 :                count--;

  030a6	46		 inc	 esi
  030a7	41		 inc	 ecx
  030a8	4f		 dec	 edi
  030a9	75 f5		 jne	 SHORT $LL17@Railgun_Qu@9

; 7537 :          }
; 7538 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  030ab	eb 04		 jmp	 SHORT $LN114@Railgun_Qu@9
$LN16@Railgun_Qu@9:
  030ad	85 ff		 test	 edi, edi
  030af	75 06		 jne	 SHORT $LN15@Railgun_Qu@9
$LN114@Railgun_Qu@9:
  030b1	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN15@Railgun_Qu@9:

; 7539 : 	     }
; 7540 : 
; 7541 : if ( bm_Sunday_Order2[*(unsigned short *)&pbTarget[i+cbPattern]]==0 )

  030b7	8b 4d 08	 mov	 ecx, DWORD PTR _pbTarget$[ebp]
  030ba	03 cb		 add	 ecx, ebx
  030bc	0f b7 14 01	 movzx	 edx, WORD PTR [ecx+eax]
  030c0	80 bc 14 30 08
	00 00 00	 cmp	 BYTE PTR _bm_Sunday_Order2$[esp+edx+67640], 0
  030c8	75 06		 jne	 SHORT $LN14@Railgun_Qu@9

; 7542 :          i=i+cbPattern+1+1;

  030ca	8d 44 18 02	 lea	 eax, DWORD PTR [eax+ebx+2]

; 7543 : else

  030ce	eb 1e		 jmp	 SHORT $LN11@Railgun_Qu@9
$LN14@Railgun_Qu@9:

; 7544 : {
; 7545 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )

  030d0	0f b6 54 01 ff	 movzx	 edx, BYTE PTR [ecx+eax-1]
  030d5	0f b6 0c 01	 movzx	 ecx, BYTE PTR [ecx+eax]
  030d9	8b 94 94 30 04
	00 00		 mov	 edx, DWORD PTR _bm_bc$[esp+edx*4+67640]
  030e0	8b 4c 8c 30	 mov	 ecx, DWORD PTR _bm_bc2nd$[esp+ecx*4+67640]
  030e4	3b d1		 cmp	 edx, ecx
  030e6	73 04		 jae	 SHORT $LN12@Railgun_Qu@9

; 7546 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  030e8	03 c1		 add	 eax, ecx

; 7547 : else

  030ea	eb 02		 jmp	 SHORT $LN11@Railgun_Qu@9
$LN12@Railgun_Qu@9:

; 7548 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];

  030ec	03 c2		 add	 eax, edx
$LN11@Railgun_Qu@9:

; 7521 : 	      }
; 7522 : // Elsiane ]
; 7523 : 
; 7524 : 
; 7525 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 7526 : 
; 7527 :     AdvanceHopperGrass = 0;
; 7528 :     i=0;
; 7529 :     while (i <= cbTarget-cbPattern-1-1) {

  030ee	8b 4c 24 18	 mov	 ecx, DWORD PTR tv665[esp+67640]

; 7549 : }
; 7550 : 
; 7551 : 
; 7552 : 
; 7553 : 
; 7554 : 
; 7555 :          AdvanceHopperGrass++;

  030f2	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+67640]
  030f6	83 c1 fe	 add	 ecx, -2			; fffffffeH
  030f9	3b c1		 cmp	 eax, ecx
  030fb	76 83		 jbe	 SHORT $LL20@Railgun_Qu@9

; 7556 :     }
; 7557 : 
; 7558 :     if (i == cbTarget-cbPattern-1) {

  030fd	8b 54 24 18	 mov	 edx, DWORD PTR tv665[esp+67640]
  03101	4a		 dec	 edx
  03102	3b c2		 cmp	 eax, edx
  03104	75 53		 jne	 SHORT $LN150@Railgun_Qu@9

; 7559 : //         ulHashTarget=*(unsigned long *)&pbTarget[i];
; 7560 : //         if ( ulHashTarget == ulHashPattern)
; 7561 :          if ( *(unsigned long *)&pbTarget[i] == ulHashPattern)

  03106	8b 4d 08	 mov	 ecx, DWORD PTR _pbTarget$[ebp]
  03109	8b 14 08	 mov	 edx, DWORD PTR [eax+ecx]

; 7562 :              {
; 7563 :          count = countSTATIC;

  0310c	8b 4c 24 1c	 mov	 ecx, DWORD PTR _countSTATIC$[esp+67640]
  03110	3b 54 24 20	 cmp	 edx, DWORD PTR _ulHashPattern$[esp+67640]
  03114	75 3c		 jne	 SHORT $LN6@Railgun_Qu@9
  03116	8b d1		 mov	 edx, ecx

; 7564 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  03118	85 c9		 test	 ecx, ecx
  0311a	74 30		 je	 SHORT $LN113@Railgun_Qu@9

; 7562 :              {
; 7563 :          count = countSTATIC;

  0311c	8b 74 24 10	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  03120	8b 7d 08	 mov	 edi, DWORD PTR _pbTarget$[ebp]
  03123	83 c6 04	 add	 esi, 4
  03126	8d 7c 38 04	 lea	 edi, DWORD PTR [eax+edi+4]
  0312a	8d 9b 00 00 00
	00		 npad	 6
$LL8@Railgun_Qu@9:

; 7564 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  03130	8a 1e		 mov	 bl, BYTE PTR [esi]
  03132	3a 1f		 cmp	 bl, BYTE PTR [edi]
  03134	75 12		 jne	 SHORT $LN7@Railgun_Qu@9

; 7565 :                count--;

  03136	47		 inc	 edi
  03137	46		 inc	 esi
  03138	4a		 dec	 edx
  03139	75 f5		 jne	 SHORT $LL8@Railgun_Qu@9

; 7566 :          }
; 7567 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  0313b	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 7568 : 	     }
; 7569 :          i++;

  03141	40		 inc	 eax

; 7570 :          AdvanceHopperGrass++;

  03142	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+67640]
  03146	eb 15		 jmp	 SHORT $LN10@Railgun_Qu@9
$LN7@Railgun_Qu@9:

; 7566 :          }
; 7567 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  03148	85 d2		 test	 edx, edx
  0314a	75 06		 jne	 SHORT $LN6@Railgun_Qu@9
$LN113@Railgun_Qu@9:
  0314c	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN6@Railgun_Qu@9:

; 7568 : 	     }
; 7569 :          i++;

  03152	40		 inc	 eax

; 7570 :          AdvanceHopperGrass++;

  03153	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+67640]
  03157	eb 04		 jmp	 SHORT $LN10@Railgun_Qu@9
$LN150@Railgun_Qu@9:
  03159	8b 4c 24 1c	 mov	 ecx, DWORD PTR _countSTATIC$[esp+67640]
$LN10@Railgun_Qu@9:

; 7571 :     }
; 7572 : 
; 7573 :     if (i == cbTarget-cbPattern) {

  0315d	3b 44 24 18	 cmp	 eax, DWORD PTR tv665[esp+67640]
  03161	75 38		 jne	 SHORT $LN5@Railgun_Qu@9

; 7574 : //         ulHashTarget=*(unsigned long *)&pbTarget[i];
; 7575 : //         if ( ulHashTarget == ulHashPattern)
; 7576 :          if ( *(unsigned long *)&pbTarget[i] == ulHashPattern)

  03163	8b 74 24 20	 mov	 esi, DWORD PTR _ulHashPattern$[esp+67640]
  03167	8b 55 08	 mov	 edx, DWORD PTR _pbTarget$[ebp]
  0316a	39 34 10	 cmp	 DWORD PTR [eax+edx], esi
  0316d	75 28		 jne	 SHORT $LN1@Railgun_Qu@9

; 7579 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  0316f	85 c9		 test	 ecx, ecx
  03171	74 1e		 je	 SHORT $LN112@Railgun_Qu@9

; 7577 :              {
; 7578 :          count = countSTATIC;

  03173	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+67640]
  03177	83 c7 04	 add	 edi, 4
  0317a	8d 44 10 04	 lea	 eax, DWORD PTR [eax+edx+4]
  0317e	8b ff		 npad	 2
$LL3@Railgun_Qu@9:

; 7579 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  03180	8a 17		 mov	 dl, BYTE PTR [edi]
  03182	3a 10		 cmp	 dl, BYTE PTR [eax]
  03184	75 07		 jne	 SHORT $LN2@Railgun_Qu@9

; 7580 :                count--;

  03186	40		 inc	 eax
  03187	47		 inc	 edi
  03188	49		 dec	 ecx
  03189	75 f5		 jne	 SHORT $LL3@Railgun_Qu@9

; 7581 :          }
; 7582 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  0318b	eb 04		 jmp	 SHORT $LN112@Railgun_Qu@9
$LN2@Railgun_Qu@9:
  0318d	85 c9		 test	 ecx, ecx
  0318f	75 06		 jne	 SHORT $LN1@Railgun_Qu@9
$LN112@Railgun_Qu@9:
  03191	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN1@Railgun_Qu@9:

; 7583 : 	     }
; 7584 :          AdvanceHopperGrass++;

  03197	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+67640]
$LN5@Railgun_Qu@9:

; 7585 :     }
; 7586 :     
; 7587 : 
; 7588 : GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  0319b	8b 44 24 24	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+67640]
  0319f	db 44 24 24	 fild	 DWORD PTR _cbTarget$GSCopy$[esp+67640]
  031a3	85 c0		 test	 eax, eax
  031a5	79 06		 jns	 SHORT $LN163@Railgun_Qu@9
  031a7	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN163@Railgun_Qu@9:
  031ad	8b 74 24 0c	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+67640]
  031b1	8b ce		 mov	 ecx, esi
  031b3	89 4c 24 28	 mov	 DWORD PTR tv1434[esp+67640], ecx
  031b7	db 44 24 28	 fild	 DWORD PTR tv1434[esp+67640]
  031bb	85 c9		 test	 ecx, ecx
  031bd	79 06		 jns	 SHORT $LN164@Railgun_Qu@9
  031bf	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN164@Railgun_Qu@9:
  031c5	de f9		 fdivp	 ST(1), ST(0)
  031c7	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  031cd	e8 00 00 00 00	 call	 __ftol2_sse
  031d2	8b c8		 mov	 ecx, eax
  031d4	99		 cdq
  031d5	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 7589 : GlobalI += AdvanceHopperGrass;
; 7590 : printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);

  031db	56		 push	 esi
  031dc	51		 push	 ecx
  031dd	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  031e3	01 35 00 00 00
	00		 add	 DWORD PTR _GlobalI, esi
  031e9	68 00 00 00 00	 push	 OFFSET $SG6822
  031ee	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  031f5	e8 00 00 00 00	 call	 _printf
  031fa	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN165@Railgun_Qu@9:

; 7593 : } //if (cbTarget<961)
; 7594 : } //if ( cbPattern<4)
; 7595 : }

  031fd	8b 8c 24 34 08
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+67640]
  03204	5f		 pop	 edi
  03205	5e		 pop	 esi
  03206	5b		 pop	 ebx
  03207	33 cc		 xor	 ecx, esp
  03209	33 c0		 xor	 eax, eax
  0320b	e8 00 00 00 00	 call	 @__security_check_cookie@4
  03210	8b e5		 mov	 esp, ebp
  03212	5d		 pop	 ebp
  03213	c3		 ret	 0
_Railgun_Quadruplet_7Elsiane_count_hits ENDP
_TEXT	ENDS
PUBLIC	_cbTarget$GSCopy$
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7sunhorse_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_AdvanceHopperGrass$ = -2088				; size = 4
tv554 = -2084						; size = 4
_pbTargetMax$ = -2084					; size = 4
tv1065 = -2080						; size = 4
tv1063 = -2080						; size = 4
tv451 = -2080						; size = 4
_Quadruplet4th$ = -2080					; size = 4
_countSTATIC$ = -2076					; size = 4
_Quadruplet2nd$ = -2076					; size = 4
tv663 = -2072						; size = 4
_cbTarget$GSCopy$ = -2072				; size = 4
_pbPattern$GSCopy$ = -2068				; size = 4
_ulHashPattern$ = -2064					; size = 4
_Quadruplet3rd$ = -2060					; size = 4
_bm_bc$ = -2056						; size = 1024
_bm_bc2nd$ = -1032					; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7sunhorse_count_hits PROC

; 7607 : {

  03220	55		 push	 ebp
  03221	8b ec		 mov	 ebp, esp
  03223	83 e4 f8	 and	 esp, -8			; fffffff8H
  03226	81 ec 2c 08 00
	00		 sub	 esp, 2092		; 0000082cH
  0322c	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  03231	33 c4		 xor	 eax, esp
  03233	89 84 24 28 08
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+2092], eax
  0323a	8b 45 10	 mov	 eax, DWORD PTR _cbTarget$[ebp]

; 7608 :     char * pbTargetMax = pbTarget + cbTarget;
; 7609 :     register unsigned long ulHashPattern;
; 7610 :     register unsigned long ulHashTarget;
; 7611 :     //unsigned long count; //r.6+
; 7612 :     signed long count;
; 7613 :     //unsigned long countSTATIC; //r.6+
; 7614 :     signed long countSTATIC;
; 7615 : //  unsigned long countRemainder;
; 7616 : 
; 7617 : /*
; 7618 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 7619 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 7620 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 7621 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 7622 : */
; 7623 :     unsigned char SINGLET;
; 7624 :     unsigned long Quadruplet2nd;
; 7625 :     unsigned long Quadruplet3rd;
; 7626 :     unsigned long Quadruplet4th;
; 7627 : 
; 7628 :     unsigned long  AdvanceHopperGrass;
; 7629 : 
; 7630 :     long i; //BMH needed
; 7631 :     int a, j;
; 7632 :     unsigned int bm_bc[ASIZE]; //BMH needed
; 7633 :     //signed int bm_bc2nd[ASIZE]; //BMS needed
; 7634 :     unsigned int bm_bc2nd[ASIZE]; //BMS needed
; 7635 : 
; 7636 :     unsigned char ch; //BMH needed
; 7637 :     unsigned long chchchch; //BMH needed
; 7638 :     unsigned short chchchchSHORT; //BMH needed
; 7639 :     //unsigned char * chPTR;
; 7640 : //    unsigned char lastch, firstch; //BMH needed
; 7641 : 
; 7642 :     if (cbPattern > cbTarget)

  0323d	8b 55 14	 mov	 edx, DWORD PTR _cbPattern$[ebp]
  03240	53		 push	 ebx
  03241	8b 5d 08	 mov	 ebx, DWORD PTR _pbTarget$[ebp]
  03244	56		 push	 esi
  03245	8b 75 0c	 mov	 esi, DWORD PTR _pbPattern$[ebp]
  03248	57		 push	 edi
  03249	8d 3c 18	 lea	 edi, DWORD PTR [eax+ebx]
  0324c	89 74 24 24	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+2104], esi

; 7796 :                count--;

  03250	89 44 24 20	 mov	 DWORD PTR _cbTarget$GSCopy$[esp+2104], eax
  03254	89 7c 24 14	 mov	 DWORD PTR _pbTargetMax$[esp+2104], edi
  03258	3b d0		 cmp	 edx, eax
  0325a	0f 87 33 03 00
	00		 ja	 $LN125@Railgun_Qu@10

; 7643 :         return(NULL);
; 7644 : 
; 7645 : // Doesn't work when cbPattern = 1
; 7646 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 7647 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  03260	83 fa 04	 cmp	 edx, 4
  03263	0f 83 95 00 00
	00		 jae	 $LN51@Railgun_Qu@10

; 7648 :         pbTarget = pbTarget+cbPattern;
; 7649 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  03269	0f be 0e	 movsx	 ecx, BYTE PTR [esi]
  0326c	0f be 44 16 ff	 movsx	 eax, BYTE PTR [esi+edx-1]
  03271	c1 e1 08	 shl	 ecx, 8
  03274	03 c1		 add	 eax, ecx

; 7650 : //        countSTATIC = cbPattern-2;
; 7651 : 
; 7652 : if ( cbPattern==3) {

  03276	8b c8		 mov	 ecx, eax
  03278	03 da		 add	 ebx, edx
  0327a	c1 e9 08	 shr	 ecx, 8
  0327d	83 fa 03	 cmp	 edx, 3
  03280	75 43		 jne	 SHORT $LL42@Railgun_Qu@10
$LL49@Railgun_Qu@10:

; 7653 :     for ( ;; )
; 7654 :     {
; 7655 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  03282	0f be 53 fd	 movsx	 edx, BYTE PTR [ebx-3]
  03286	0f be 7b ff	 movsx	 edi, BYTE PTR [ebx-1]
  0328a	c1 e2 08	 shl	 edx, 8
  0328d	03 d7		 add	 edx, edi
  0328f	3b c2		 cmp	 eax, edx
  03291	75 0e		 jne	 SHORT $LN46@Railgun_Qu@10

; 7656 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));

  03293	8a 56 01	 mov	 dl, BYTE PTR [esi+1]
  03296	3a 53 fe	 cmp	 dl, BYTE PTR [ebx-2]
  03299	75 06		 jne	 SHORT $LN46@Railgun_Qu@10
  0329b	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN46@Railgun_Qu@10:

; 7657 :         }
; 7658 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  032a1	3a 4b fe	 cmp	 cl, BYTE PTR [ebx-2]
  032a4	74 01		 je	 SHORT $LN45@Railgun_Qu@10
  032a6	43		 inc	 ebx
$LN45@Railgun_Qu@10:

; 7659 :         pbTarget++;

  032a7	43		 inc	 ebx

; 7660 :         if (pbTarget > pbTargetMax)

  032a8	3b 5c 24 14	 cmp	 ebx, DWORD PTR _pbTargetMax$[esp+2104]
  032ac	76 d4		 jbe	 SHORT $LL49@Railgun_Qu@10

; 7831 : 
; 7832 :     return(NULL);

  032ae	33 c0		 xor	 eax, eax

; 7833 : } //if (cbTarget<961)
; 7834 : } //if ( cbPattern<4)
; 7835 : }

  032b0	5f		 pop	 edi
  032b1	5e		 pop	 esi
  032b2	5b		 pop	 ebx
  032b3	8b 8c 24 28 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2092]
  032ba	33 cc		 xor	 ecx, esp
  032bc	e8 00 00 00 00	 call	 @__security_check_cookie@4
  032c1	8b e5		 mov	 esp, ebp
  032c3	5d		 pop	 ebp
  032c4	c3		 ret	 0
$LL42@Railgun_Qu@10:

; 7661 :             return(NULL);
; 7662 :     }
; 7663 : } else {
; 7664 : }
; 7665 :     for ( ;; )
; 7666 :     {
; 7667 :         // The line below gives for 'cbPattern'>=1:
; 7668 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 7669 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 7670 : /*
; 7671 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 7672 :             return((long)(pbTarget-cbPattern));
; 7673 : */
; 7674 : 
; 7675 :         // The fragment below gives for 'cbPattern'>=2:
; 7676 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 7677 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 7678 : 
; 7679 : /*
; 7680 : //For 2 and 3 [
; 7681 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 7682 : //         count = countSTATIC;
; 7683 :          count = cbPattern-2;
; 7684 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7685 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 7686 :                count--;
; 7687 :          }
; 7688 :          if ( count == 0) return((pbTarget-cbPattern));
; 7689 :         }
; 7690 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 7691 : //For 2 and 3 ]
; 7692 : */
; 7693 : 
; 7694 : 
; 7695 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  032c5	0f be 53 fe	 movsx	 edx, BYTE PTR [ebx-2]
  032c9	0f be 73 ff	 movsx	 esi, BYTE PTR [ebx-1]
  032cd	c1 e2 08	 shl	 edx, 8
  032d0	03 d6		 add	 edx, esi
  032d2	3b c2		 cmp	 eax, edx
  032d4	75 06		 jne	 SHORT $LN40@Railgun_Qu@10

; 7696 :             Railgunhits++; //return((pbTarget-2));

  032d6	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN40@Railgun_Qu@10:

; 7697 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  032dc	3a 4b ff	 cmp	 cl, BYTE PTR [ebx-1]
  032df	74 01		 je	 SHORT $LN39@Railgun_Qu@10
  032e1	43		 inc	 ebx
$LN39@Railgun_Qu@10:

; 7698 : 
; 7699 : 
; 7700 :         // The fragment below gives for 'cbPattern'>=2:
; 7701 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 7702 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 7703 : /*
; 7704 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 7705 :          count = countSTATIC>>2;
; 7706 :          countRemainder = countSTATIC % 4;
; 7707 : 
; 7708 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 7709 :                count--;
; 7710 :          }
; 7711 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 7712 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 7713 :                countRemainder--;
; 7714 :          }
; 7715 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 7716 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 7717 :          //}
; 7718 :         }
; 7719 : */
; 7720 : 
; 7721 :         pbTarget++;

  032e2	43		 inc	 ebx

; 7722 :         if (pbTarget > pbTargetMax)

  032e3	3b df		 cmp	 ebx, edi
  032e5	76 de		 jbe	 SHORT $LL42@Railgun_Qu@10

; 7831 : 
; 7832 :     return(NULL);

  032e7	33 c0		 xor	 eax, eax

; 7833 : } //if (cbTarget<961)
; 7834 : } //if ( cbPattern<4)
; 7835 : }

  032e9	5f		 pop	 edi
  032ea	5e		 pop	 esi
  032eb	5b		 pop	 ebx
  032ec	8b 8c 24 28 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2092]
  032f3	33 cc		 xor	 ecx, esp
  032f5	e8 00 00 00 00	 call	 @__security_check_cookie@4
  032fa	8b e5		 mov	 esp, ebp
  032fc	5d		 pop	 ebp
  032fd	c3		 ret	 0
$LN51@Railgun_Qu@10:

; 7723 :             return(NULL);
; 7724 :     }
; 7725 : } else { //if ( cbPattern<4)
; 7726 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  032fe	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H
  03303	0f 83 fe 00 00
	00		 jae	 $LN36@Railgun_Qu@10

; 7727 : {
; 7728 :         pbTarget = pbTarget+cbPattern;
; 7729 :         ulHashPattern = *(unsigned long *)(pbPattern);

  03309	8b 06		 mov	 eax, DWORD PTR [esi]
  0330b	89 44 24 28	 mov	 DWORD PTR _ulHashPattern$[esp+2104], eax

; 7730 : //        countSTATIC = cbPattern-1;
; 7731 : 
; 7732 :     //SINGLET = *(char *)(pbPattern);
; 7733 :     SINGLET = ulHashPattern & 0xFF;
; 7734 :     Quadruplet2nd = SINGLET<<8;

  0330f	0f b6 c0	 movzx	 eax, al
  03312	8b c8		 mov	 ecx, eax
  03314	c1 e1 08	 shl	 ecx, 8
  03317	89 4c 24 1c	 mov	 DWORD PTR _Quadruplet2nd$[esp+2104], ecx

; 7735 :     Quadruplet3rd = SINGLET<<16;

  0331b	8b c8		 mov	 ecx, eax
  0331d	03 da		 add	 ebx, edx
  0331f	c1 e1 10	 shl	 ecx, 16			; 00000010H
  03322	89 44 24 20	 mov	 DWORD PTR tv663[esp+2104], eax

; 7736 :     Quadruplet4th = SINGLET<<24;

  03326	c1 e0 18	 shl	 eax, 24			; 00000018H
  03329	89 5d 08	 mov	 DWORD PTR _pbTarget$[ebp], ebx
  0332c	89 4c 24 2c	 mov	 DWORD PTR _Quadruplet3rd$[esp+2104], ecx
  03330	89 44 24 18	 mov	 DWORD PTR _Quadruplet4th$[esp+2104], eax
$LN35@Railgun_Qu@10:

; 7737 : 
; 7738 :     for ( ;; )
; 7739 :     {
; 7740 : 	AdvanceHopperGrass = 0;
; 7741 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  03334	8b c3		 mov	 eax, ebx
  03336	2b c2		 sub	 eax, edx
  03338	8b 00		 mov	 eax, DWORD PTR [eax]
  0333a	c7 44 24 10 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], 0

; 7742 : 
; 7743 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  03342	39 44 24 28	 cmp	 DWORD PTR _ulHashPattern$[esp+2104], eax
  03346	75 54		 jne	 SHORT $LN33@Railgun_Qu@10

; 7744 : //         count = countSTATIC;
; 7745 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7746 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 7747 : //               count--;
; 7748 : //         }
; 7749 :          count = cbPattern-1;

  03348	8d 42 ff	 lea	 eax, DWORD PTR [edx-1]

; 7750 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  0334b	85 c0		 test	 eax, eax
  0334d	74 45		 je	 SHORT $LN86@Railgun_Qu@10

; 7744 : //         count = countSTATIC;
; 7745 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7746 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 7747 : //               count--;
; 7748 : //         }
; 7749 :          count = cbPattern-1;

  0334f	8b 74 24 24	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
  03353	8b fb		 mov	 edi, ebx
  03355	2b f0		 sub	 esi, eax
  03357	2b f8		 sub	 edi, eax
  03359	03 f2		 add	 esi, edx
  0335b	eb 03 8d 49 00	 npad	 5
$LL32@Railgun_Qu@10:

; 7750 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  03360	8a 0f		 mov	 cl, BYTE PTR [edi]
  03362	38 0e		 cmp	 BYTE PTR [esi], cl
  03364	75 2a		 jne	 SHORT $LN31@Railgun_Qu@10

; 7751 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  03366	8b 5c 24 10	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+2104]
  0336a	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  0336d	03 d8		 add	 ebx, eax
  0336f	3b cb		 cmp	 ecx, ebx
  03371	75 0d		 jne	 SHORT $LN30@Railgun_Qu@10
  03373	0f be 0f	 movsx	 ecx, BYTE PTR [edi]
  03376	39 4c 24 20	 cmp	 DWORD PTR tv663[esp+2104], ecx
  0337a	74 04		 je	 SHORT $LN30@Railgun_Qu@10
  0337c	ff 44 24 10	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+2104]
$LN30@Railgun_Qu@10:

; 7752 :                count--;
; 7753 :          }
; 7754 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  03380	8b 5d 08	 mov	 ebx, DWORD PTR _pbTarget$[ebp]
  03383	46		 inc	 esi
  03384	47		 inc	 edi
  03385	48		 dec	 eax
  03386	75 d8		 jne	 SHORT $LL32@Railgun_Qu@10
  03388	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 7755 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  0338e	eb 4b		 jmp	 SHORT $LN25@Railgun_Qu@10
$LN31@Railgun_Qu@10:

; 7752 :                count--;
; 7753 :          }
; 7754 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  03390	85 c0		 test	 eax, eax
  03392	75 47		 jne	 SHORT $LN25@Railgun_Qu@10
$LN86@Railgun_Qu@10:
  03394	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 7755 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  0339a	eb 3f		 jmp	 SHORT $LN25@Railgun_Qu@10
$LN33@Railgun_Qu@10:

; 7756 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  0339c	8b c8		 mov	 ecx, eax
  0339e	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  033a4	39 4c 24 1c	 cmp	 DWORD PTR _Quadruplet2nd$[esp+2104], ecx
  033a8	74 31		 je	 SHORT $LN25@Railgun_Qu@10

; 7757 :          AdvanceHopperGrass++;
; 7758 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  033aa	8b c8		 mov	 ecx, eax
  033ac	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  033b2	c7 44 24 10 01
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], 1
  033ba	39 4c 24 2c	 cmp	 DWORD PTR _Quadruplet3rd$[esp+2104], ecx
  033be	74 1b		 je	 SHORT $LN25@Railgun_Qu@10

; 7759 :               AdvanceHopperGrass++;
; 7760 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  033c0	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  033c5	c7 44 24 10 02
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], 2
  033cd	39 44 24 18	 cmp	 DWORD PTR _Quadruplet4th$[esp+2104], eax
  033d1	74 08		 je	 SHORT $LN25@Railgun_Qu@10
  033d3	c7 44 24 10 03
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], 3
$LN25@Railgun_Qu@10:

; 7761 :          }
; 7762 :     }
; 7763 : 	}
; 7764 : 
; 7765 : 	AdvanceHopperGrass++;
; 7766 : 
; 7767 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  033db	8b 44 24 10	 mov	 eax, DWORD PTR _AdvanceHopperGrass$[esp+2104]
  033df	8d 5c 03 01	 lea	 ebx, DWORD PTR [ebx+eax+1]
  033e3	89 5d 08	 mov	 DWORD PTR _pbTarget$[ebp], ebx

; 7768 :         if (pbTarget > pbTargetMax)

  033e6	3b 5c 24 14	 cmp	 ebx, DWORD PTR _pbTargetMax$[esp+2104]
  033ea	0f 86 44 ff ff
	ff		 jbe	 $LN35@Railgun_Qu@10

; 7831 : 
; 7832 :     return(NULL);

  033f0	33 c0		 xor	 eax, eax

; 7833 : } //if (cbTarget<961)
; 7834 : } //if ( cbPattern<4)
; 7835 : }

  033f2	5f		 pop	 edi
  033f3	5e		 pop	 esi
  033f4	5b		 pop	 ebx
  033f5	8b 8c 24 28 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2092]
  033fc	33 cc		 xor	 ecx, esp
  033fe	e8 00 00 00 00	 call	 @__security_check_cookie@4
  03403	8b e5		 mov	 esp, ebp
  03405	5d		 pop	 ebp
  03406	c3		 ret	 0
$LN36@Railgun_Qu@10:

; 7769 :             return(NULL);
; 7770 :     }
; 7771 : } else { //if (cbTarget<961)
; 7772 :         //countSTATIC = cbPattern-2; //r.6+
; 7773 :         //countSTATIC = cbPattern-2-3;
; 7774 :         //countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!
; 7775 :         //countSTATIC = cbPattern-2-3; // r.7- At last no recompared bytes in-between chars
; 7776 :         countSTATIC = cbPattern-2-2; // r.7 

  03407	8d 4a fc	 lea	 ecx, DWORD PTR [edx-4]
  0340a	89 4c 24 1c	 mov	 DWORD PTR _countSTATIC$[esp+2104], ecx
  0340e	8d 42 01	 lea	 eax, DWORD PTR [edx+1]

; 7777 : 
; 7778 : 
; 7779 :     /* Preprocessing */
; 7780 : //    for (a=0; a < ASIZE; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=-1;}
; 7781 :     for (a=0; a < ASIZE; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern+1;}

  03411	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  03416	8d bc 24 30 04
	00 00		 lea	 edi, DWORD PTR _bm_bc2nd$[esp+2104]
  0341d	f3 ab		 rep stosd
  0341f	8b c2		 mov	 eax, edx
  03421	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  03426	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc$[esp+2104]
  0342a	f3 ab		 rep stosd

; 7782 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 

  0342c	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  0342f	33 c0		 xor	 eax, eax
  03431	85 c9		 test	 ecx, ecx
  03433	74 15		 je	 SHORT $LN17@Railgun_Qu@10
$LL19@Railgun_Qu@10:
  03435	0f be 3c 06	 movsx	 edi, BYTE PTR [esi+eax]
  03439	8b ca		 mov	 ecx, edx
  0343b	2b c8		 sub	 ecx, eax
  0343d	49		 dec	 ecx
  0343e	89 4c bc 30	 mov	 DWORD PTR _bm_bc$[esp+edi*4+2104], ecx
  03442	40		 inc	 eax
  03443	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  03446	3b c1		 cmp	 eax, ecx
  03448	72 eb		 jb	 SHORT $LL19@Railgun_Qu@10
$LN17@Railgun_Qu@10:

; 7783 : //    for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=j; 
; 7784 :     for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=cbPattern-j; 

  0344a	33 c0		 xor	 eax, eax
  0344c	85 d2		 test	 edx, edx
  0344e	74 14		 je	 SHORT $LN14@Railgun_Qu@10
$LL16@Railgun_Qu@10:
  03450	0f be 3c 06	 movsx	 edi, BYTE PTR [esi+eax]
  03454	8b ca		 mov	 ecx, edx
  03456	2b c8		 sub	 ecx, eax
  03458	40		 inc	 eax
  03459	89 8c bc 30 04
	00 00		 mov	 DWORD PTR _bm_bc2nd$[esp+edi*4+2104], ecx
  03460	3b c2		 cmp	 eax, edx
  03462	72 ec		 jb	 SHORT $LL16@Railgun_Qu@10
$LN14@Railgun_Qu@10:

; 7785 : 
; 7786 :         ulHashPattern = *(unsigned long *)(pbPattern);

  03464	8b 06		 mov	 eax, DWORD PTR [esi]

; 7787 : 
; 7788 :     AdvanceHopperGrass = 0;
; 7789 :     i=0;
; 7790 :     while (i <= cbTarget-cbPattern-1) {

  03466	8b 4c 24 20	 mov	 ecx, DWORD PTR _cbTarget$GSCopy$[esp+2104]
  0346a	89 44 24 28	 mov	 DWORD PTR _ulHashPattern$[esp+2104], eax
  0346e	33 c0		 xor	 eax, eax
  03470	2b ca		 sub	 ecx, edx
  03472	89 4c 24 14	 mov	 DWORD PTR tv554[esp+2104], ecx
  03476	8d 0c 13	 lea	 ecx, DWORD PTR [ebx+edx]
  03479	89 44 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], eax
  0347d	89 4c 24 18	 mov	 DWORD PTR tv451[esp+2104], ecx
$LN13@Railgun_Qu@10:

; 7791 :          ulHashTarget=*(unsigned long *)&pbTarget[i];
; 7792 :          if ( ulHashTarget == ulHashPattern)

  03481	8b 54 24 28	 mov	 edx, DWORD PTR _ulHashPattern$[esp+2104]
  03485	39 14 18	 cmp	 DWORD PTR [eax+ebx], edx
  03488	75 41		 jne	 SHORT $LN8@Railgun_Qu@10

; 7793 :              {
; 7794 :          count = countSTATIC;

  0348a	8b 7c 24 1c	 mov	 edi, DWORD PTR _countSTATIC$[esp+2104]

; 7795 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  0348e	85 ff		 test	 edi, edi
  03490	74 2d		 je	 SHORT $LN85@Railgun_Qu@10

; 7793 :              {
; 7794 :          count = countSTATIC;

  03492	8d 56 04	 lea	 edx, DWORD PTR [esi+4]
  03495	8d 74 18 04	 lea	 esi, DWORD PTR [eax+ebx+4]
  03499	8d a4 24 00 00
	00 00		 npad	 7
$LL10@Railgun_Qu@10:

; 7795 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  034a0	8a 0a		 mov	 cl, BYTE PTR [edx]
  034a2	3a 0e		 cmp	 cl, BYTE PTR [esi]
  034a4	75 11		 jne	 SHORT $LN9@Railgun_Qu@10

; 7796 :                count--;

  034a6	46		 inc	 esi
  034a7	42		 inc	 edx
  034a8	4f		 dec	 edi
  034a9	75 f5		 jne	 SHORT $LL10@Railgun_Qu@10

; 7797 :          }
; 7798 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  034ab	8b 74 24 24	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
  034af	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  034b5	eb 14		 jmp	 SHORT $LN8@Railgun_Qu@10
$LN9@Railgun_Qu@10:
  034b7	85 ff		 test	 edi, edi
  034b9	75 0c		 jne	 SHORT $LN111@Railgun_Qu@10
  034bb	8b 74 24 24	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
$LN85@Railgun_Qu@10:
  034bf	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  034c5	eb 04		 jmp	 SHORT $LN8@Railgun_Qu@10
$LN111@Railgun_Qu@10:
  034c7	8b 74 24 24	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
$LN8@Railgun_Qu@10:

; 7799 : 	     }
; 7800 : 
; 7801 : //         i+=cbPattern;
; 7802 : //         i= i - bm_bc2nd[(unsigned char)pbTarget[i]];
; 7803 : 
; 7804 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < ((cbPattern) - bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]]) )
; 7805 : //         i= i + ((cbPattern) - bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]]);
; 7806 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )

  034cb	8b 54 24 18	 mov	 edx, DWORD PTR tv451[esp+2104]
  034cf	0f b6 4c 02 ff	 movzx	 ecx, BYTE PTR [edx+eax-1]
  034d4	0f b6 14 02	 movzx	 edx, BYTE PTR [edx+eax]
  034d8	8b 4c 8c 30	 mov	 ecx, DWORD PTR _bm_bc$[esp+ecx*4+2104]
  034dc	8b 94 94 30 04
	00 00		 mov	 edx, DWORD PTR _bm_bc2nd$[esp+edx*4+2104]
  034e3	3b ca		 cmp	 ecx, edx
  034e5	73 04		 jae	 SHORT $LN7@Railgun_Qu@10

; 7807 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  034e7	03 c2		 add	 eax, edx

; 7808 : else

  034e9	eb 02		 jmp	 SHORT $LN6@Railgun_Qu@10
$LN7@Railgun_Qu@10:

; 7809 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];

  034eb	03 c1		 add	 eax, ecx
$LN6@Railgun_Qu@10:

; 7787 : 
; 7788 :     AdvanceHopperGrass = 0;
; 7789 :     i=0;
; 7790 :     while (i <= cbTarget-cbPattern-1) {

  034ed	8b 4c 24 14	 mov	 ecx, DWORD PTR tv554[esp+2104]

; 7810 : 
; 7811 : 
; 7812 :          AdvanceHopperGrass++;

  034f1	ff 44 24 10	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+2104]
  034f5	49		 dec	 ecx
  034f6	3b c1		 cmp	 eax, ecx
  034f8	76 87		 jbe	 SHORT $LN13@Railgun_Qu@10

; 7813 :     }
; 7814 :     if (i == cbTarget-cbPattern) {

  034fa	3b 44 24 14	 cmp	 eax, DWORD PTR tv554[esp+2104]
  034fe	75 33		 jne	 SHORT $LN5@Railgun_Qu@10

; 7815 :          ulHashTarget=*(unsigned long *)&pbTarget[i];
; 7816 :          if ( ulHashTarget == ulHashPattern)

  03500	8b 4c 24 28	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+2104]
  03504	39 0c 18	 cmp	 DWORD PTR [eax+ebx], ecx
  03507	75 26		 jne	 SHORT $LN1@Railgun_Qu@10

; 7817 :              {
; 7818 :          count = countSTATIC;

  03509	8b 4c 24 1c	 mov	 ecx, DWORD PTR _countSTATIC$[esp+2104]

; 7819 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  0350d	85 c9		 test	 ecx, ecx
  0350f	74 18		 je	 SHORT $LN84@Railgun_Qu@10

; 7817 :              {
; 7818 :          count = countSTATIC;

  03511	83 c6 04	 add	 esi, 4
  03514	8d 5c 18 04	 lea	 ebx, DWORD PTR [eax+ebx+4]
$LL3@Railgun_Qu@10:

; 7819 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  03518	8a 16		 mov	 dl, BYTE PTR [esi]
  0351a	3a 13		 cmp	 dl, BYTE PTR [ebx]
  0351c	75 07		 jne	 SHORT $LN2@Railgun_Qu@10

; 7820 :                count--;

  0351e	43		 inc	 ebx
  0351f	46		 inc	 esi
  03520	49		 dec	 ecx
  03521	75 f5		 jne	 SHORT $LL3@Railgun_Qu@10

; 7821 :          }
; 7822 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  03523	eb 04		 jmp	 SHORT $LN84@Railgun_Qu@10
$LN2@Railgun_Qu@10:
  03525	85 c9		 test	 ecx, ecx
  03527	75 06		 jne	 SHORT $LN1@Railgun_Qu@10
$LN84@Railgun_Qu@10:
  03529	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN1@Railgun_Qu@10:

; 7823 : 	     }
; 7824 :          AdvanceHopperGrass++;

  0352f	ff 44 24 10	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+2104]
$LN5@Railgun_Qu@10:

; 7825 :     }
; 7826 :     
; 7827 : 
; 7828 : GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  03533	8b 44 24 20	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+2104]
  03537	db 44 24 20	 fild	 DWORD PTR _cbTarget$GSCopy$[esp+2104]
  0353b	85 c0		 test	 eax, eax
  0353d	79 06		 jns	 SHORT $LN123@Railgun_Qu@10
  0353f	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN123@Railgun_Qu@10:
  03545	8b 4c 24 10	 mov	 ecx, DWORD PTR _AdvanceHopperGrass$[esp+2104]
  03549	db 44 24 10	 fild	 DWORD PTR _AdvanceHopperGrass$[esp+2104]
  0354d	85 c9		 test	 ecx, ecx
  0354f	79 06		 jns	 SHORT $LN124@Railgun_Qu@10
  03551	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN124@Railgun_Qu@10:
  03557	de f9		 fdivp	 ST(1), ST(0)
  03559	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  0355f	e8 00 00 00 00	 call	 __ftol2_sse
  03564	8b c8		 mov	 ecx, eax
  03566	99		 cdq
  03567	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 7829 : GlobalI += AdvanceHopperGrass;

  0356d	8b 44 24 10	 mov	 eax, DWORD PTR _AdvanceHopperGrass$[esp+2104]

; 7830 : printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);

  03571	50		 push	 eax
  03572	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  03578	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalI, eax
  0357e	51		 push	 ecx
  0357f	68 00 00 00 00	 push	 OFFSET $SG6942
  03584	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  0358b	e8 00 00 00 00	 call	 _printf
  03590	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN125@Railgun_Qu@10:

; 7833 : } //if (cbTarget<961)
; 7834 : } //if ( cbPattern<4)
; 7835 : }

  03593	8b 8c 24 34 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2104]
  0359a	5f		 pop	 edi
  0359b	5e		 pop	 esi
  0359c	5b		 pop	 ebx
  0359d	33 cc		 xor	 ecx, esp
  0359f	33 c0		 xor	 eax, eax
  035a1	e8 00 00 00 00	 call	 @__security_check_cookie@4
  035a6	8b e5		 mov	 esp, ebp
  035a8	5d		 pop	 ebp
  035a9	c3		 ret	 0
_Railgun_Quadruplet_7sunhorse_count_hits ENDP
_TEXT	ENDS
PUBLIC	_cbTarget$GSCopy$
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7sun_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_AdvanceHopperGrass$ = -1064				; size = 4
tv694 = -1057						; size = 1
_pbPattern$GSCopy$ = -1056				; size = 4
tv947 = -1052						; size = 4
tv945 = -1052						; size = 4
tv481 = -1052						; size = 4
_pbTargetMax$ = -1052					; size = 4
_countSTATIC$ = -1048					; size = 4
_Quadruplet2nd$ = -1048					; size = 4
_ulHashPattern$ = -1044					; size = 4
_cbTarget$GSCopy$ = -1040				; size = 4
_Quadruplet4th$ = -1040					; size = 4
tv576 = -1036						; size = 4
_Quadruplet3rd$ = -1032					; size = 4
_bm_bc2nd$ = -1028					; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7sun_count_hits PROC

; 7847 : {

  035b0	81 ec 28 04 00
	00		 sub	 esp, 1064		; 00000428H
  035b6	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  035bb	33 c4		 xor	 eax, esp
  035bd	89 84 24 24 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1064], eax

; 7848 :     char * pbTargetMax = pbTarget + cbTarget;
; 7849 :     register unsigned long ulHashPattern;
; 7850 :     register unsigned long ulHashTarget;
; 7851 :     //unsigned long count; //r.6+
; 7852 :     signed long count;
; 7853 :     //unsigned long countSTATIC; //r.6+
; 7854 :     signed long countSTATIC;
; 7855 : //  unsigned long countRemainder;
; 7856 : 
; 7857 : /*
; 7858 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 7859 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 7860 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 7861 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 7862 : */
; 7863 :     unsigned char SINGLET;
; 7864 :     unsigned long Quadruplet2nd;
; 7865 :     unsigned long Quadruplet3rd;
; 7866 :     unsigned long Quadruplet4th;
; 7867 : 
; 7868 :     unsigned long  AdvanceHopperGrass;
; 7869 : 
; 7870 :     long i; //BMH needed
; 7871 :     int a, j;
; 7872 :     unsigned int bm_bc[ASIZE]; //BMH needed
; 7873 :     signed int bm_bc2nd[ASIZE]; //BMS needed
; 7874 : 
; 7875 :     unsigned char ch; //BMH needed
; 7876 :     unsigned long chchchch; //BMH needed
; 7877 :     unsigned short chchchchSHORT; //BMH needed
; 7878 :     //unsigned char * chPTR;
; 7879 : //    unsigned char lastch, firstch; //BMH needed
; 7880 : 
; 7881 :     if (cbPattern > cbTarget)

  035c4	8b 94 24 38 04
	00 00		 mov	 edx, DWORD PTR _cbPattern$[esp+1060]
  035cb	53		 push	 ebx
  035cc	8b 9c 24 38 04
	00 00		 mov	 ebx, DWORD PTR _cbTarget$[esp+1064]
  035d3	55		 push	 ebp
  035d4	8b ac 24 38 04
	00 00		 mov	 ebp, DWORD PTR _pbPattern$[esp+1068]
  035db	56		 push	 esi
  035dc	8b b4 24 38 04
	00 00		 mov	 esi, DWORD PTR _pbTarget$[esp+1072]
  035e3	57		 push	 edi
  035e4	8d 3c 33	 lea	 edi, DWORD PTR [ebx+esi]
  035e7	89 6c 24 18	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1080], ebp
  035eb	89 5c 24 28	 mov	 DWORD PTR _cbTarget$GSCopy$[esp+1080], ebx
  035ef	89 7c 24 1c	 mov	 DWORD PTR _pbTargetMax$[esp+1080], edi
  035f3	3b d3		 cmp	 edx, ebx

; 7882 :         return(NULL);

  035f5	0f 87 c1 02 00
	00		 ja	 $LN111@Railgun_Qu@11

; 7883 : 
; 7884 : // Doesn't work when cbPattern = 1
; 7885 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 7886 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  035fb	83 fa 04	 cmp	 edx, 4
  035fe	73 7d		 jae	 SHORT $LN46@Railgun_Qu@11

; 7887 :         pbTarget = pbTarget+cbPattern;
; 7888 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  03600	0f be 4d 00	 movsx	 ecx, BYTE PTR [ebp]
  03604	0f be 44 2a ff	 movsx	 eax, BYTE PTR [edx+ebp-1]
  03609	c1 e1 08	 shl	 ecx, 8
  0360c	03 c1		 add	 eax, ecx

; 7889 : //        countSTATIC = cbPattern-2;
; 7890 : 
; 7891 : if ( cbPattern==3) {

  0360e	8b c8		 mov	 ecx, eax
  03610	03 f2		 add	 esi, edx
  03612	c1 e9 08	 shr	 ecx, 8
  03615	83 fa 03	 cmp	 edx, 3
  03618	75 35		 jne	 SHORT $LN87@Railgun_Qu@11
  0361a	8d 9b 00 00 00
	00		 npad	 6
$LL44@Railgun_Qu@11:

; 7892 :     for ( ;; )
; 7893 :     {
; 7894 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  03620	0f be 56 fd	 movsx	 edx, BYTE PTR [esi-3]
  03624	0f be 5e ff	 movsx	 ebx, BYTE PTR [esi-1]
  03628	c1 e2 08	 shl	 edx, 8
  0362b	03 d3		 add	 edx, ebx
  0362d	3b c2		 cmp	 eax, edx
  0362f	75 0e		 jne	 SHORT $LN107@Railgun_Qu@11

; 7895 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));

  03631	8a 55 01	 mov	 dl, BYTE PTR [ebp+1]
  03634	3a 56 fe	 cmp	 dl, BYTE PTR [esi-2]
  03637	75 06		 jne	 SHORT $LN107@Railgun_Qu@11
  03639	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN107@Railgun_Qu@11:

; 7896 :         }
; 7897 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  0363f	3a 4e fe	 cmp	 cl, BYTE PTR [esi-2]
  03642	74 01		 je	 SHORT $LN108@Railgun_Qu@11
  03644	46		 inc	 esi
$LN108@Railgun_Qu@11:

; 7898 :         pbTarget++;

  03645	46		 inc	 esi

; 7899 :         if (pbTarget > pbTargetMax)

  03646	3b f7		 cmp	 esi, edi
  03648	76 d6		 jbe	 SHORT $LL44@Railgun_Qu@11

; 7900 :             return(NULL);

  0364a	e9 6d 02 00 00	 jmp	 $LN111@Railgun_Qu@11
$LN87@Railgun_Qu@11:
  0364f	ba 01 00 00 00	 mov	 edx, 1
$LL37@Railgun_Qu@11:

; 7901 :     }
; 7902 : } else {
; 7903 : }
; 7904 :     for ( ;; )
; 7905 :     {
; 7906 :         // The line below gives for 'cbPattern'>=1:
; 7907 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 7908 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 7909 : /*
; 7910 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 7911 :             return((long)(pbTarget-cbPattern));
; 7912 : */
; 7913 : 
; 7914 :         // The fragment below gives for 'cbPattern'>=2:
; 7915 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 7916 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 7917 : 
; 7918 : /*
; 7919 : //For 2 and 3 [
; 7920 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 7921 : //         count = countSTATIC;
; 7922 :          count = cbPattern-2;
; 7923 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7924 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 7925 :                count--;
; 7926 :          }
; 7927 :          if ( count == 0) return((pbTarget-cbPattern));
; 7928 :         }
; 7929 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 7930 : //For 2 and 3 ]
; 7931 : */
; 7932 : 
; 7933 : 
; 7934 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  03654	0f be 5e fe	 movsx	 ebx, BYTE PTR [esi-2]
  03658	0f be 6e ff	 movsx	 ebp, BYTE PTR [esi-1]
  0365c	c1 e3 08	 shl	 ebx, 8
  0365f	03 dd		 add	 ebx, ebp
  03661	3b c3		 cmp	 eax, ebx
  03663	75 06		 jne	 SHORT $LN35@Railgun_Qu@11

; 7935 :             Railgunhits++; //return((pbTarget-2));

  03665	01 15 00 00 00
	00		 add	 DWORD PTR _Railgunhits, edx
$LN35@Railgun_Qu@11:

; 7936 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  0366b	3a 4e ff	 cmp	 cl, BYTE PTR [esi-1]
  0366e	74 02		 je	 SHORT $LN34@Railgun_Qu@11
  03670	03 f2		 add	 esi, edx
$LN34@Railgun_Qu@11:

; 7937 : 
; 7938 : 
; 7939 :         // The fragment below gives for 'cbPattern'>=2:
; 7940 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 7941 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 7942 : /*
; 7943 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 7944 :          count = countSTATIC>>2;
; 7945 :          countRemainder = countSTATIC % 4;
; 7946 : 
; 7947 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 7948 :                count--;
; 7949 :          }
; 7950 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 7951 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 7952 :                countRemainder--;
; 7953 :          }
; 7954 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 7955 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 7956 :          //}
; 7957 :         }
; 7958 : */
; 7959 : 
; 7960 :         pbTarget++;

  03672	03 f2		 add	 esi, edx

; 7961 :         if (pbTarget > pbTargetMax)

  03674	3b f7		 cmp	 esi, edi
  03676	76 dc		 jbe	 SHORT $LL37@Railgun_Qu@11

; 7962 :             return(NULL);

  03678	e9 3f 02 00 00	 jmp	 $LN111@Railgun_Qu@11
$LN46@Railgun_Qu@11:

; 7963 :     }
; 7964 : } else { //if ( cbPattern<4)
; 7965 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  0367d	81 fb c1 03 00
	00		 cmp	 ebx, 961		; 000003c1H
  03683	0f 83 f9 00 00
	00		 jae	 $LN31@Railgun_Qu@11

; 7966 : {
; 7967 :         pbTarget = pbTarget+cbPattern;
; 7968 :         ulHashPattern = *(unsigned long *)(pbPattern);

  03689	8b 4d 00	 mov	 ecx, DWORD PTR [ebp]

; 7969 : //        countSTATIC = cbPattern-1;
; 7970 : 
; 7971 :     //SINGLET = *(char *)(pbPattern);
; 7972 :     SINGLET = ulHashPattern & 0xFF;
; 7973 :     Quadruplet2nd = SINGLET<<8;

  0368c	0f b6 c1	 movzx	 eax, cl
  0368f	8b f8		 mov	 edi, eax

; 7974 :     Quadruplet3rd = SINGLET<<16;

  03691	8b d8		 mov	 ebx, eax
  03693	c1 e7 08	 shl	 edi, 8
  03696	c1 e3 10	 shl	 ebx, 16			; 00000010H
  03699	03 f2		 add	 esi, edx
  0369b	89 44 24 2c	 mov	 DWORD PTR tv576[esp+1080], eax

; 7975 :     Quadruplet4th = SINGLET<<24;

  0369f	c1 e0 18	 shl	 eax, 24			; 00000018H
  036a2	89 4c 24 24	 mov	 DWORD PTR _ulHashPattern$[esp+1080], ecx
  036a6	89 7c 24 20	 mov	 DWORD PTR _Quadruplet2nd$[esp+1080], edi
  036aa	89 5c 24 30	 mov	 DWORD PTR _Quadruplet3rd$[esp+1080], ebx
  036ae	89 44 24 28	 mov	 DWORD PTR _Quadruplet4th$[esp+1080], eax
  036b2	eb 0c		 jmp	 SHORT $LN30@Railgun_Qu@11
$LL100@Railgun_Qu@11:
  036b4	8b 7c 24 20	 mov	 edi, DWORD PTR _Quadruplet2nd$[esp+1080]
  036b8	8b 5c 24 30	 mov	 ebx, DWORD PTR _Quadruplet3rd$[esp+1080]
  036bc	8b 4c 24 24	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+1080]
$LN30@Railgun_Qu@11:

; 7976 : 
; 7977 :     for ( ;; )
; 7978 :     {
; 7979 : 	AdvanceHopperGrass = 0;
; 7980 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  036c0	8b c6		 mov	 eax, esi
  036c2	2b c2		 sub	 eax, edx
  036c4	8b 00		 mov	 eax, DWORD PTR [eax]
  036c6	c7 44 24 10 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], 0

; 7981 : 
; 7982 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  036ce	3b c8		 cmp	 ecx, eax
  036d0	75 58		 jne	 SHORT $LN28@Railgun_Qu@11

; 7983 : //         count = countSTATIC;
; 7984 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7985 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 7986 : //               count--;
; 7987 : //         }
; 7988 :          count = cbPattern-1;

  036d2	8d 42 ff	 lea	 eax, DWORD PTR [edx-1]

; 7989 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  036d5	85 c0		 test	 eax, eax
  036d7	74 49		 je	 SHORT $LN105@Railgun_Qu@11

; 7983 : //         count = countSTATIC;
; 7984 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 7985 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 7986 : //               count--;
; 7987 : //         }
; 7988 :          count = cbPattern-1;

  036d9	8b cd		 mov	 ecx, ebp
  036db	8b fe		 mov	 edi, esi
  036dd	2b c8		 sub	 ecx, eax
  036df	2b f8		 sub	 edi, eax
  036e1	03 ca		 add	 ecx, edx
$LL27@Railgun_Qu@11:

; 7989 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  036e3	8a 1f		 mov	 bl, BYTE PTR [edi]
  036e5	88 5c 24 17	 mov	 BYTE PTR tv694[esp+1080], bl
  036e9	38 19		 cmp	 BYTE PTR [ecx], bl
  036eb	75 2d		 jne	 SHORT $LN26@Railgun_Qu@11

; 7990 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  036ed	8b 5c 24 10	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+1080]
  036f1	03 d8		 add	 ebx, eax
  036f3	8d 6a ff	 lea	 ebp, DWORD PTR [edx-1]
  036f6	3b eb		 cmp	 ebp, ebx
  036f8	75 0f		 jne	 SHORT $LN96@Railgun_Qu@11
  036fa	0f be 5c 24 17	 movsx	 ebx, BYTE PTR tv694[esp+1080]
  036ff	39 5c 24 2c	 cmp	 DWORD PTR tv576[esp+1080], ebx
  03703	74 04		 je	 SHORT $LN96@Railgun_Qu@11
  03705	ff 44 24 10	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+1080]
$LN96@Railgun_Qu@11:

; 7991 :                count--;

  03709	41		 inc	 ecx
  0370a	47		 inc	 edi
  0370b	48		 dec	 eax
  0370c	75 d5		 jne	 SHORT $LL27@Railgun_Qu@11

; 7992 :          }
; 7993 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  0370e	8b 6c 24 18	 mov	 ebp, DWORD PTR _pbPattern$GSCopy$[esp+1080]
  03712	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 7994 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  03718	eb 51		 jmp	 SHORT $LN99@Railgun_Qu@11
$LN26@Railgun_Qu@11:

; 7992 :          }
; 7993 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  0371a	85 c0		 test	 eax, eax
  0371c	75 49		 jne	 SHORT $LN97@Railgun_Qu@11
  0371e	8b 6c 24 18	 mov	 ebp, DWORD PTR _pbPattern$GSCopy$[esp+1080]
$LN105@Railgun_Qu@11:
  03722	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 7994 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  03728	eb 41		 jmp	 SHORT $LN99@Railgun_Qu@11
$LN28@Railgun_Qu@11:

; 7995 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  0372a	8b c8		 mov	 ecx, eax
  0372c	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  03732	3b f9		 cmp	 edi, ecx
  03734	74 35		 je	 SHORT $LN99@Railgun_Qu@11

; 7996 :          AdvanceHopperGrass++;
; 7997 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  03736	8b c8		 mov	 ecx, eax
  03738	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  0373e	c7 44 24 10 01
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], 1
  03746	3b d9		 cmp	 ebx, ecx
  03748	74 21		 je	 SHORT $LN99@Railgun_Qu@11

; 7998 :               AdvanceHopperGrass++;
; 7999 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  0374a	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  0374f	c7 44 24 10 02
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], 2
  03757	39 44 24 28	 cmp	 DWORD PTR _Quadruplet4th$[esp+1080], eax
  0375b	74 0e		 je	 SHORT $LN99@Railgun_Qu@11
  0375d	c7 44 24 10 03
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], 3
  03765	eb 04		 jmp	 SHORT $LN99@Railgun_Qu@11
$LN97@Railgun_Qu@11:
  03767	8b 6c 24 18	 mov	 ebp, DWORD PTR _pbPattern$GSCopy$[esp+1080]
$LN99@Railgun_Qu@11:

; 8000 :          }
; 8001 :     }
; 8002 : 	}
; 8003 : 
; 8004 : 	AdvanceHopperGrass++;
; 8005 : 
; 8006 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  0376b	8b 44 24 10	 mov	 eax, DWORD PTR _AdvanceHopperGrass$[esp+1080]
  0376f	8d 74 06 01	 lea	 esi, DWORD PTR [esi+eax+1]

; 8007 :         if (pbTarget > pbTargetMax)

  03773	3b 74 24 1c	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+1080]
  03777	0f 86 37 ff ff
	ff		 jbe	 $LL100@Railgun_Qu@11

; 8008 :             return(NULL);

  0377d	e9 3a 01 00 00	 jmp	 $LN111@Railgun_Qu@11
$LN31@Railgun_Qu@11:

; 8009 :     }
; 8010 : } else { //if (cbTarget<961)
; 8011 :         //countSTATIC = cbPattern-2; //r.6+
; 8012 :         //countSTATIC = cbPattern-2-3;
; 8013 :         //countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!
; 8014 :         //countSTATIC = cbPattern-2-3; // r.7- At last no recompared bytes in-between chars
; 8015 :         countSTATIC = cbPattern-2-2; // r.7 

  03782	8d 4a fc	 lea	 ecx, DWORD PTR [edx-4]
  03785	89 4c 24 20	 mov	 DWORD PTR _countSTATIC$[esp+1080], ecx

; 8016 : 
; 8017 : 
; 8018 : 
; 8019 : 
; 8020 :     /* Preprocessing */
; 8021 :     for (a=0; a < ASIZE; a++) {bm_bc2nd[a]= -1;}

  03789	83 c8 ff	 or	 eax, -1
  0378c	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  03791	8d 7c 24 34	 lea	 edi, DWORD PTR _bm_bc2nd$[esp+1080]
  03795	f3 ab		 rep stosd

; 8022 :     for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=j; 

  03797	33 c0		 xor	 eax, eax
  03799	85 d2		 test	 edx, edx
  0379b	74 10		 je	 SHORT $LN12@Railgun_Qu@11
  0379d	8d 49 00	 npad	 3
$LL14@Railgun_Qu@11:
  037a0	0f be 0c 28	 movsx	 ecx, BYTE PTR [eax+ebp]
  037a4	89 44 8c 34	 mov	 DWORD PTR _bm_bc2nd$[esp+ecx*4+1080], eax
  037a8	40		 inc	 eax
  037a9	3b c2		 cmp	 eax, edx
  037ab	72 f3		 jb	 SHORT $LL14@Railgun_Qu@11
$LN12@Railgun_Qu@11:

; 8023 : 
; 8024 : 
; 8025 : //        ulHashPattern = *(unsigned long *)(pbPattern+cbPattern-1-3);
; 8026 :         ulHashPattern = *(unsigned long *)(pbPattern);

  037ad	8b 45 00	 mov	 eax, DWORD PTR [ebp]
  037b0	89 44 24 24	 mov	 DWORD PTR _ulHashPattern$[esp+1080], eax

; 8027 : 
; 8028 : /*
; 8029 : // Original Sunday [
; 8030 :     AdvanceHopperGrass = 0;
; 8031 :     i=0;
; 8032 :     while (i <= cbTarget-cbPattern) {
; 8033 :          ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8034 :          if ( ulHashTarget == ulHashPattern)
; 8035 :              {
; 8036 :          count = countSTATIC;
; 8037 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8038 :                count--;
; 8039 :          }
; 8040 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8041 : 	     }
; 8042 : 
; 8043 :          i+=cbPattern;
; 8044 :          if (i<cbTarget) i= i - bm_bc2nd[(unsigned char)pbTarget[i]];
; 8045 : 
; 8046 :          AdvanceHopperGrass++;
; 8047 :     }
; 8048 : // Original Sunday ]
; 8049 : */
; 8050 : 
; 8051 :     AdvanceHopperGrass = 0;
; 8052 :     i=0;

  037b4	33 c0		 xor	 eax, eax

; 8053 :     while (i <= cbTarget-cbPattern-1) {

  037b6	2b da		 sub	 ebx, edx
  037b8	c7 44 24 10 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], 0
  037c0	89 5c 24 1c	 mov	 DWORD PTR tv481[esp+1080], ebx
$LL11@Railgun_Qu@11:

; 8054 :          ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8055 :          if ( ulHashTarget == ulHashPattern)

  037c4	8b 4c 24 24	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+1080]
  037c8	39 0c 30	 cmp	 DWORD PTR [eax+esi], ecx
  037cb	75 3f		 jne	 SHORT $LN6@Railgun_Qu@11

; 8056 :              {
; 8057 :          count = countSTATIC;

  037cd	8b 4c 24 20	 mov	 ecx, DWORD PTR _countSTATIC$[esp+1080]

; 8058 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  037d1	85 c9		 test	 ecx, ecx
  037d3	74 2b		 je	 SHORT $LN102@Railgun_Qu@11

; 8056 :              {
; 8057 :          count = countSTATIC;

  037d5	83 c5 04	 add	 ebp, 4
  037d8	8d 7c 30 04	 lea	 edi, DWORD PTR [eax+esi+4]
  037dc	8d 64 24 00	 npad	 4
$LL8@Railgun_Qu@11:

; 8058 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  037e0	8a 5d 00	 mov	 bl, BYTE PTR [ebp]
  037e3	3a 1f		 cmp	 bl, BYTE PTR [edi]
  037e5	75 11		 jne	 SHORT $LN7@Railgun_Qu@11

; 8059 :                count--;

  037e7	47		 inc	 edi
  037e8	45		 inc	 ebp
  037e9	49		 dec	 ecx
  037ea	75 f4		 jne	 SHORT $LL8@Railgun_Qu@11

; 8060 :          }
; 8061 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  037ec	8b 6c 24 18	 mov	 ebp, DWORD PTR _pbPattern$GSCopy$[esp+1080]
  037f0	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  037f6	eb 14		 jmp	 SHORT $LN6@Railgun_Qu@11
$LN7@Railgun_Qu@11:
  037f8	85 c9		 test	 ecx, ecx
  037fa	75 0c		 jne	 SHORT $LN98@Railgun_Qu@11
  037fc	8b 6c 24 18	 mov	 ebp, DWORD PTR _pbPattern$GSCopy$[esp+1080]
$LN102@Railgun_Qu@11:
  03800	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  03806	eb 04		 jmp	 SHORT $LN6@Railgun_Qu@11
$LN98@Railgun_Qu@11:
  03808	8b 6c 24 18	 mov	 ebp, DWORD PTR _pbPattern$GSCopy$[esp+1080]
$LN6@Railgun_Qu@11:

; 8062 : 	     }
; 8063 : 
; 8064 :          i+=cbPattern;
; 8065 :          i= i - bm_bc2nd[(unsigned char)pbTarget[i]];
; 8066 : 
; 8067 :          AdvanceHopperGrass++;

  0380c	8b 5c 24 10	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+1080]
  03810	8b 7c 24 1c	 mov	 edi, DWORD PTR tv481[esp+1080]
  03814	03 c2		 add	 eax, edx
  03816	0f b6 0c 30	 movzx	 ecx, BYTE PTR [eax+esi]
  0381a	2b 44 8c 34	 sub	 eax, DWORD PTR _bm_bc2nd$[esp+ecx*4+1080]
  0381e	43		 inc	 ebx
  0381f	8d 4f ff	 lea	 ecx, DWORD PTR [edi-1]
  03822	89 5c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], ebx
  03826	3b c1		 cmp	 eax, ecx
  03828	76 9a		 jbe	 SHORT $LL11@Railgun_Qu@11

; 8068 :     }
; 8069 :     if (i == cbTarget-cbPattern) {

  0382a	3b c7		 cmp	 eax, edi
  0382c	75 30		 jne	 SHORT $LN106@Railgun_Qu@11

; 8070 :          ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8071 :          if ( ulHashTarget == ulHashPattern)

  0382e	8b 54 24 24	 mov	 edx, DWORD PTR _ulHashPattern$[esp+1080]
  03832	39 14 30	 cmp	 DWORD PTR [eax+esi], edx
  03835	75 26		 jne	 SHORT $LN103@Railgun_Qu@11

; 8072 :              {
; 8073 :          count = countSTATIC;

  03837	8b 4c 24 20	 mov	 ecx, DWORD PTR _countSTATIC$[esp+1080]

; 8074 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  0383b	85 c9		 test	 ecx, ecx
  0383d	74 18		 je	 SHORT $LN76@Railgun_Qu@11

; 8072 :              {
; 8073 :          count = countSTATIC;

  0383f	8d 7d 04	 lea	 edi, DWORD PTR [ebp+4]
  03842	8d 44 30 04	 lea	 eax, DWORD PTR [eax+esi+4]
$LL3@Railgun_Qu@11:

; 8074 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  03846	8a 17		 mov	 dl, BYTE PTR [edi]
  03848	3a 10		 cmp	 dl, BYTE PTR [eax]
  0384a	75 07		 jne	 SHORT $LN2@Railgun_Qu@11

; 8075 :                count--;

  0384c	40		 inc	 eax
  0384d	47		 inc	 edi
  0384e	49		 dec	 ecx
  0384f	75 f5		 jne	 SHORT $LL3@Railgun_Qu@11

; 8076 :          }
; 8077 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  03851	eb 04		 jmp	 SHORT $LN76@Railgun_Qu@11
$LN2@Railgun_Qu@11:
  03853	85 c9		 test	 ecx, ecx
  03855	75 06		 jne	 SHORT $LN103@Railgun_Qu@11
$LN76@Railgun_Qu@11:
  03857	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN103@Railgun_Qu@11:

; 8078 : 	     }
; 8079 :          AdvanceHopperGrass++;

  0385d	43		 inc	 ebx
$LN106@Railgun_Qu@11:

; 8080 :     }
; 8081 :     
; 8082 : 
; 8083 : /*
; 8084 : Input Pattern(up to 19+2000 chars): fast
; 8085 : 
; 8086 : Skip-Performance(bigger-the-better): 456%, 45330622 skips/iterations
; 8087 : Railgun_Quadruplet_7sun_hits/Railgun_Quadruplet_7sun_clocks: 5945/193
; 8088 : Railgun_Quadruplet_7sun performance: 1046KB/clock
; 8089 : 
; 8090 : Skip-Performance(bigger-the-better): 389%, 53138919 skips/iterations
; 8091 : Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 5945/356
; 8092 : Railgun_Quadruplet_7deuce performance: 567KB/clock
; 8093 : 
; 8094 : Skip-Performance(bigger-the-better): 377%, 54788054 skips/iterations
; 8095 : Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 5945/207
; 8096 : Railgun_Quadruplet_7 performance: 976KB/clock
; 8097 : 
; 8098 : Input Pattern(up to 19+2000 chars): faster
; 8099 : 
; 8100 : Skip-Performance(bigger-the-better): 591%, 34996936 skips/iterations
; 8101 : Railgun_Quadruplet_7sun_hits/Railgun_Quadruplet_7sun_clocks: 744/151
; 8102 : Railgun_Quadruplet_7sun performance: 1338KB/clock
; 8103 : 
; 8104 : Skip-Performance(bigger-the-better): 567%, 36434006 skips/iterations
; 8105 : Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 744/307
; 8106 : Railgun_Quadruplet_7deuce performance: 658KB/clock
; 8107 : 
; 8108 : Skip-Performance(bigger-the-better): 514%, 40194194 skips/iterations
; 8109 : Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 744/153
; 8110 : Railgun_Quadruplet_7 performance: 1320KB/clock
; 8111 : 
; 8112 : Input Pattern(up to 19+2000 chars): lesser
; 8113 : 
; 8114 : Skip-Performance(bigger-the-better): 619%, 33423799 skips/iterations
; 8115 : Railgun_Quadruplet_7sun_hits/Railgun_Quadruplet_7sun_clocks: 229/143
; 8116 : Railgun_Quadruplet_7sun performance: 1413KB/clock
; 8117 : 
; 8118 : Skip-Performance(bigger-the-better): 580%, 35625791 skips/iterations
; 8119 : Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 229/256
; 8120 : Railgun_Quadruplet_7deuce performance: 789KB/clock
; 8121 : 
; 8122 : Skip-Performance(bigger-the-better): 543%, 38047818 skips/iterations
; 8123 : Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 229/146
; 8124 : Railgun_Quadruplet_7 performance: 1383KB/clock
; 8125 : 
; 8126 : Input Pattern(up to 19+2000 chars): beautiful
; 8127 : 
; 8128 : Skip-Performance(bigger-the-better): 862%, 23986874 skips/iterations
; 8129 : Railgun_Quadruplet_7sun_hits/Railgun_Quadruplet_7sun_clocks: 27958/110
; 8130 : Railgun_Quadruplet_7sun performance: 1836KB/clock
; 8131 : 
; 8132 : Skip-Performance(bigger-the-better): 857%, 24117314 skips/iterations
; 8133 : Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 27958/212
; 8134 : Railgun_Quadruplet_7deuce performance: 953KB/clock
; 8135 : 
; 8136 : Skip-Performance(bigger-the-better): 790%, 26174714 skips/iterations
; 8137 : Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 27958/105
; 8138 : Railgun_Quadruplet_7 performance: 1924KB/clock
; 8139 : 
; 8140 : Input Pattern(up to 19+2000 chars): beautiful dress
; 8141 : 
; 8142 : Skip-Performance(bigger-the-better): 967%, 21375549 skips/iterations
; 8143 : Railgun_Quadruplet_7sun_hits/Railgun_Quadruplet_7sun_clocks: 11/101
; 8144 : Railgun_Quadruplet_7sun performance: 2000KB/clock
; 8145 : 
; 8146 : Skip-Performance(bigger-the-better): 1093%, 18928081 skips/iterations
; 8147 : Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 11/196
; 8148 : Railgun_Quadruplet_7deuce performance: 1030KB/clock
; 8149 : 
; 8150 : Skip-Performance(bigger-the-better): 869%, 23787030 skips/iterations
; 8151 : Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 11/99
; 8152 : Railgun_Quadruplet_7 performance: 2041KB/clock
; 8153 : */
; 8154 : 
; 8155 : 
; 8156 : 
; 8157 : 
; 8158 : GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  0385e	8b 44 24 28	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+1080]
  03862	db 44 24 28	 fild	 DWORD PTR _cbTarget$GSCopy$[esp+1080]
  03866	85 c0		 test	 eax, eax
  03868	79 06		 jns	 SHORT $LN109@Railgun_Qu@11
  0386a	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN109@Railgun_Qu@11:
  03870	8b cb		 mov	 ecx, ebx
  03872	89 4c 24 1c	 mov	 DWORD PTR tv945[esp+1080], ecx
  03876	db 44 24 1c	 fild	 DWORD PTR tv945[esp+1080]
  0387a	85 c9		 test	 ecx, ecx
  0387c	79 06		 jns	 SHORT $LN110@Railgun_Qu@11
  0387e	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN110@Railgun_Qu@11:
  03884	de f9		 fdivp	 ST(1), ST(0)
  03886	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  0388c	e8 00 00 00 00	 call	 __ftol2_sse
  03891	8b c8		 mov	 ecx, eax
  03893	99		 cdq
  03894	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 8159 : GlobalI += AdvanceHopperGrass;
; 8160 : printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);

  0389a	53		 push	 ebx
  0389b	51		 push	 ecx
  0389c	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  038a2	01 1d 00 00 00
	00		 add	 DWORD PTR _GlobalI, ebx
  038a8	68 00 00 00 00	 push	 OFFSET $SG7054
  038ad	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  038b4	e8 00 00 00 00	 call	 _printf
  038b9	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN111@Railgun_Qu@11:

; 8161 : 
; 8162 :     return(NULL);
; 8163 : } //if (cbTarget<961)
; 8164 : } //if ( cbPattern<4)
; 8165 : }

  038bc	8b 8c 24 34 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1080]
  038c3	5f		 pop	 edi
  038c4	5e		 pop	 esi
  038c5	5d		 pop	 ebp
  038c6	5b		 pop	 ebx
  038c7	33 cc		 xor	 ecx, esp
  038c9	33 c0		 xor	 eax, eax
  038cb	e8 00 00 00 00	 call	 @__security_check_cookie@4
  038d0	81 c4 28 04 00
	00		 add	 esp, 1064		; 00000428H
  038d6	c3		 ret	 0
_Railgun_Quadruplet_7sun_count_hits ENDP
_TEXT	ENDS
PUBLIC	_cbTarget$GSCopy$
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7deuce_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_AdvanceHopperGrass$ = -2088				; size = 4
_pbPattern$GSCopy$ = -2084				; size = 4
tv1001 = -2080						; size = 4
tv999 = -2080						; size = 4
_countSTATIC$ = -2080					; size = 4
_Quadruplet4th$ = -2080					; size = 4
tv663 = -2076						; size = 4
_cbTarget$GSCopy$ = -2076				; size = 4
$T10457 = -2072						; size = 4
_pbTargetMax$ = -2072					; size = 4
tv695 = -2068						; size = 4
_Quadruplet3rd$ = -2068					; size = 4
tv704 = -2064						; size = 4
_Quadruplet2nd$ = -2064					; size = 4
_ulHashPattern$ = -2060					; size = 4
_bm_bc2nd$ = -2056					; size = 1024
_bm_bc$ = -1032						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7deuce_count_hits PROC

; 8192 : {

  038e0	55		 push	 ebp
  038e1	8b ec		 mov	 ebp, esp
  038e3	83 e4 f8	 and	 esp, -8			; fffffff8H
  038e6	81 ec 2c 08 00
	00		 sub	 esp, 2092		; 0000082cH
  038ec	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  038f1	33 c4		 xor	 eax, esp
  038f3	89 84 24 28 08
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+2092], eax
  038fa	8b 45 10	 mov	 eax, DWORD PTR _cbTarget$[ebp]

; 8193 :     char * pbTargetMax = pbTarget + cbTarget;
; 8194 :     register unsigned long ulHashPattern;
; 8195 :     register unsigned long ulHashTarget;
; 8196 :     //unsigned long count; //r.6+
; 8197 :     signed long count;
; 8198 :     //unsigned long countSTATIC; //r.6+
; 8199 :     signed long countSTATIC;
; 8200 : //  unsigned long countRemainder;
; 8201 : 
; 8202 : /*
; 8203 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 8204 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 8205 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 8206 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 8207 : */
; 8208 :     unsigned char SINGLET;
; 8209 :     unsigned long Quadruplet2nd;
; 8210 :     unsigned long Quadruplet3rd;
; 8211 :     unsigned long Quadruplet4th;
; 8212 : 
; 8213 :     unsigned long  AdvanceHopperGrass;
; 8214 : 
; 8215 :     long i; //BMH needed
; 8216 :     int a, j, bm_bc[ASIZE], bm_bc2nd[ASIZE]; //BMH needed
; 8217 :     unsigned char ch; //BMH needed
; 8218 :     unsigned long chchchch; //BMH needed
; 8219 :     unsigned short chchchchSHORT; //BMH needed
; 8220 :     //unsigned char * chPTR;
; 8221 : //    unsigned char lastch, firstch; //BMH needed
; 8222 : 
; 8223 :     if (cbPattern > cbTarget)

  038fd	8b 55 14	 mov	 edx, DWORD PTR _cbPattern$[ebp]
  03900	53		 push	 ebx
  03901	8b 5d 08	 mov	 ebx, DWORD PTR _pbTarget$[ebp]
  03904	56		 push	 esi
  03905	8b 75 0c	 mov	 esi, DWORD PTR _pbPattern$[ebp]
  03908	57		 push	 edi
  03909	8d 3c 18	 lea	 edi, DWORD PTR [eax+ebx]
  0390c	89 74 24 14	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+2104], esi

; 8394 :                count--;

  03910	89 44 24 1c	 mov	 DWORD PTR _cbTarget$GSCopy$[esp+2104], eax
  03914	89 7c 24 20	 mov	 DWORD PTR _pbTargetMax$[esp+2104], edi
  03918	3b d0		 cmp	 edx, eax
  0391a	0f 87 0a 03 00
	00		 ja	 $LN112@Railgun_Qu@12

; 8224 :         return(NULL);
; 8225 : 
; 8226 : // Doesn't work when cbPattern = 1
; 8227 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 8228 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  03920	83 fa 04	 cmp	 edx, 4
  03923	0f 83 95 00 00
	00		 jae	 $LN46@Railgun_Qu@12

; 8229 :         pbTarget = pbTarget+cbPattern;
; 8230 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  03929	0f be 0e	 movsx	 ecx, BYTE PTR [esi]
  0392c	0f be 44 16 ff	 movsx	 eax, BYTE PTR [esi+edx-1]
  03931	c1 e1 08	 shl	 ecx, 8
  03934	03 c1		 add	 eax, ecx

; 8231 : //        countSTATIC = cbPattern-2;
; 8232 : 
; 8233 : if ( cbPattern==3) {

  03936	8b c8		 mov	 ecx, eax
  03938	03 da		 add	 ebx, edx
  0393a	c1 e9 08	 shr	 ecx, 8
  0393d	83 fa 03	 cmp	 edx, 3
  03940	75 43		 jne	 SHORT $LL37@Railgun_Qu@12
$LL44@Railgun_Qu@12:

; 8234 :     for ( ;; )
; 8235 :     {
; 8236 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  03942	0f be 53 fd	 movsx	 edx, BYTE PTR [ebx-3]
  03946	0f be 7b ff	 movsx	 edi, BYTE PTR [ebx-1]
  0394a	c1 e2 08	 shl	 edx, 8
  0394d	03 d7		 add	 edx, edi
  0394f	3b c2		 cmp	 eax, edx
  03951	75 0e		 jne	 SHORT $LN41@Railgun_Qu@12

; 8237 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));

  03953	8a 56 01	 mov	 dl, BYTE PTR [esi+1]
  03956	3a 53 fe	 cmp	 dl, BYTE PTR [ebx-2]
  03959	75 06		 jne	 SHORT $LN41@Railgun_Qu@12
  0395b	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN41@Railgun_Qu@12:

; 8238 :         }
; 8239 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  03961	3a 4b fe	 cmp	 cl, BYTE PTR [ebx-2]
  03964	74 01		 je	 SHORT $LN40@Railgun_Qu@12
  03966	43		 inc	 ebx
$LN40@Railgun_Qu@12:

; 8240 :         pbTarget++;

  03967	43		 inc	 ebx

; 8241 :         if (pbTarget > pbTargetMax)

  03968	3b 5c 24 20	 cmp	 ebx, DWORD PTR _pbTargetMax$[esp+2104]
  0396c	76 d4		 jbe	 SHORT $LL44@Railgun_Qu@12

; 8493 : 
; 8494 : 
; 8495 : // Revision 7deuce vs 7, a short showdown
; 8496 : 
; 8497 : // Just wanted to see how a two barrel gun is gonna fire, (in fact how a search for two (choosing the bigger skip every time) patterns performs):
; 8498 : // Note1: Two skip tables are in use, the two patterns are: the original and the original one char(the-most-right) short. For example fast/fas, faster/faste, beautiful/beautifu as follows:
; 8499 : 
; 8500 : // r.7:
; 8501 : // Doing Search for Pattern(4bytes) into String(206908949bytes) as-one-line ...
; 8502 : // Input Pattern(up to 19+2000 chars): fast
; 8503 : // Performance(bigger-the-better): 377%, 54788054 skips
; 8504 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 5945/220
; 8505 : // Railgun_Quadruplet_7 performance: 918KB/clock
; 8506 : 
; 8507 : // r.7deuce:
; 8508 : // Doing Search for Pattern(4bytes) into String(206908949bytes) as-one-line ...
; 8509 : // Input Pattern(up to 19+2000 chars): fast
; 8510 : // Performance(bigger-the-better): 389%, 53138919 skips
; 8511 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 5945/363
; 8512 : // Railgun_Quadruplet_7deuce performance: 556KB/clock
; 8513 : 
; 8514 : // r.7:
; 8515 : // Doing Search for Pattern(6bytes) into String(206908949bytes) as-one-line ...
; 8516 : // Input Pattern(up to 19+2000 chars): faster
; 8517 : // Performance(bigger-the-better): 514%, 40194194 skips
; 8518 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 744/164
; 8519 : // Railgun_Quadruplet_7 performance: 1232KB/clock
; 8520 : 
; 8521 : // r.7deuce:
; 8522 : // Doing Search for Pattern(6bytes) into String(206908949bytes) as-one-line ...
; 8523 : // Input Pattern(up to 19+2000 chars): faster
; 8524 : // Performance(bigger-the-better): 567%, 36434006 skips
; 8525 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 744/314
; 8526 : // Railgun_Quadruplet_7deuce performance: 643KB/clock
; 8527 : 
; 8528 : // r.7:
; 8529 : // Doing Search for Pattern(9bytes) into String(206908949bytes) as-one-line ...
; 8530 : // Input Pattern(up to 19+2000 chars): beautiful
; 8531 : // Performance(bigger-the-better): 790%, 26174714 skips
; 8532 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 27958/114
; 8533 : // Railgun_Quadruplet_7 performance: 1772KB/clock
; 8534 : 
; 8535 : // r.7deuce:
; 8536 : // Doing Search for Pattern(9bytes) into String(206908949bytes) as-one-line ...
; 8537 : // Input Pattern(up to 19+2000 chars): beautiful
; 8538 : // Performance(bigger-the-better): 857%, 24117314 skips
; 8539 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 27958/216
; 8540 : // Railgun_Quadruplet_7deuce performance: 935KB/clock
; 8541 : 
; 8542 : // r.7:
; 8543 : // Doing Search for Pattern(15bytes) into String(206908949bytes) as-one-line ...
; 8544 : // Input Pattern(up to 19+2000 chars): beautiful dress
; 8545 : // Performance(bigger-the-better): 869%, 23787030 skips
; 8546 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 11/107
; 8547 : // Railgun_Quadruplet_7 performance: 1888KB/clock
; 8548 : 
; 8549 : // r.7deuce:
; 8550 : // Doing Search for Pattern(15bytes) into String(206908949bytes) as-one-line ...
; 8551 : // Input Pattern(up to 19+2000 chars): beautiful dress
; 8552 : // Performance(bigger-the-better): 1093%, 18928081 skips
; 8553 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 11/198
; 8554 : // Railgun_Quadruplet_7deuce performance: 1020KB/clock
; 8555 : 
; 8556 : // Note2: Lower number of skips means bigger strides, to traverse the distance effectively requires two things: to make bigger strides and to make them faster.
; 8557 : // Note3: Revision 7deuce is nastily slower when compared to r.7 but stronger(the impact from bad scenarios is lower), Pentium Merom 2166Mhz is used.
; 8558 : // Note4: The firing-test shows that adding a single if-else fragment leads to almost two times speed-performance-degradation.
; 8559 : 
; 8560 : // ; 3217 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] )
; 8561 : // 
; 8562 : //   011ab	8b 54 24 24	 mov	 edx, DWORD PTR tv689[esp+2104]
; 8563 : //   011af	0f b6 0c 02	 movzx	 ecx, BYTE PTR [edx+eax]
; 8564 : //   011b3	8b 54 24 28	 mov	 edx, DWORD PTR tv698[esp+2104]
; 8565 : //   011b7	0f b6 14 02	 movzx	 edx, BYTE PTR [edx+eax]
; 8566 : //   011bb	8b 4c 8c 30	 mov	 ecx, DWORD PTR _bm_bc2nd$[esp+ecx*4+2104]
; 8567 : //   011bf	8b 94 94 30 04
; 8568 : // 	00 00		 mov	 edx, DWORD PTR _bm_bc$[esp+edx*4+2104]
; 8569 : //   011c6	3b d1		 cmp	 edx, ecx
; 8570 : //   011c8	7d 04		 jge	 SHORT $LN2@Railgun_Qu@5
; 8571 : // 
; 8572 : // ; 3218 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]];
; 8573 : // 
; 8574 : //   011ca	03 c1		 add	 eax, ecx
; 8575 : // 
; 8576 : // ; 3219 : else
; 8577 : // 
; 8578 : //   011cc	eb 02		 jmp	 SHORT $LN1@Railgun_Qu@5
; 8579 : // $LN2@Railgun_Qu@5:
; 8580 : // 
; 8581 : // ; 3220 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8582 : // 
; 8583 : //   011ce	03 c2		 add	 eax, edx
; 8584 : // $LN1@Railgun_Qu@5:
; 8585 : 
; 8586 : // Note5: I wonder how i7 will handle these (so many) memory accesses, in other words whether these ugly speed-performance ratios 1232/643=1.91:1 ('faster' pattern) and 1772/935=1.89:1 ('beautiful' pattern) will remain.
; 8587 : 
; 8588 : 
; 8589 : 
; 8590 : 
; 8591 : 
; 8592 : 
; 8593 : 
; 8594 : 
; 8595 : 
; 8596 : 
; 8597 : /*
; 8598 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 8599 : 
; 8600 :     i=0;
; 8601 :     while (i <= cbTarget-cbPattern) {
; 8602 :        //ch=pbTarget[i+cbPattern-1];
; 8603 :        //ch=pbTarget[i];
; 8604 :           //if ( pbTarget[i] == pbPattern[0] && *(unsigned long *)&pbTarget[i+cbPattern-1-3] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8605 : //          if ( *(unsigned long *)&pbTarget[i] == ulHashPattern ) // The lesson I learned from r.7- now applied in r.7: instead of extracting 'ch' having higher address now the lower address is extracted first in order (hopefully, the test confirms it) the next 32bytes (including 'ch') to be cached i.e. to comparison part is faster.
; 8606 : ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8607 : //ch = (unsigned char)(ulHashTarget>>24);
; 8608 : //ch = (unsigned char)pbTarget[i+3];
; 8609 : //ch = (unsigned char)bm_bc2nd[(unsigned char)pbTarget[i+3]];
; 8610 : //ch = (unsigned char)bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8611 : 
; 8612 :          if ( ulHashTarget == ulHashPattern)
; 8613 :              {
; 8614 :          count = countSTATIC;
; 8615 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8616 :                count--;
; 8617 :          }
; 8618 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8619 : 	     }
; 8620 : 
; 8621 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)(ulHashTarget>>24)] ) // 1383KB 'beautiful'
; 8622 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+3]] ) // 1413KB 'beautiful'
; 8623 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < 4 ) // 1433KB 'beautiful'
; 8624 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+3]];
; 8625 : else
; 8626 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8627 : 
; 8628 :     }
; 8629 : */
; 8630 : 
; 8631 : 
; 8632 : 
; 8633 : 
; 8634 : 
; 8635 : 
; 8636 : 
; 8637 : 
; 8638 : 
; 8639 : 
; 8640 : 
; 8641 : /*
; 8642 :     for (j=cbPattern-1; j > 0; j--) bm_bc[pbPattern[j]]=j;             
; 8643 : ch = (unsigned char)bm_bc[pbPattern[0]];
; 8644 : 
; 8645 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8646 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 
; 8647 : 
; 8648 : if (ch > (unsigned char)bm_bc[pbPattern[cbPattern-1]]) {
; 8649 : 
; 8650 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8651 :     for (j=cbPattern-1; j > 0; j--) bm_bc[pbPattern[j]]=j; // Restore backward state
; 8652 : 
; 8653 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 8654 : 
; 8655 : // Backward [
; 8656 :     i=(cbTarget-cbPattern);
; 8657 :     while (i >= 0) {
; 8658 :        //ch=pbTarget[i+cbPattern-1];
; 8659 : //       ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8660 :        ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8661 :           if (ulHashTarget == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8662 :              {
; 8663 :          count = countSTATIC;
; 8664 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8665 :                count--;
; 8666 :          }
; 8667 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8668 : 	     }
; 8669 :        //i+=bm_bc[*chPTR]; // Twice as slow than the below line!
; 8670 : //       i+=bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8671 :          i-=bm_bc[(unsigned char)pbTarget[i]];
; 8672 : //         i-=bm_bc[(unsigned char)(ulHashTarget & 0xFF)]; // ?! superslow ?!
; 8673 : //         i-=bm_bc[*(unsigned char *)&ulHashTarget]; // ?! superslow ?!
; 8674 :     }
; 8675 : // Backward ]
; 8676 : 
; 8677 : } else {
; 8678 : 
; 8679 :     //for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8680 :     //for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; // Restore forward state
; 8681 : 
; 8682 :         ulHashPattern = *(unsigned long *)(pbPattern+cbPattern-1-3);
; 8683 : 
; 8684 : // Forward [
; 8685 :     //lastch=pbPattern[cbPattern-1];
; 8686 :     //firstch=pbPattern[0];
; 8687 :     i=0;
; 8688 :     while (i <= cbTarget-cbPattern) {
; 8689 :        //ch=pbTarget[i+cbPattern-1];
; 8690 : //       ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8691 :        ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8692 :           if (ulHashTarget == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8693 :              {
; 8694 :          count = countSTATIC;
; 8695 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)) == *(char *)(&pbTarget[i]+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8696 :                count--;
; 8697 :          }
; 8698 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8699 : 	     }
; 8700 :        //i+=bm_bc[*chPTR]; // Twice as slow than the below line!
; 8701 :        i+=bm_bc[(unsigned char)(ulHashTarget>>24)];
; 8702 :     }
; 8703 : // Forward ]
; 8704 : 
; 8705 : }
; 8706 : */
; 8707 : 
; 8708 :     return(NULL);

  0396e	33 c0		 xor	 eax, eax

; 8709 : } //if (cbTarget<961)
; 8710 : } //if ( cbPattern<4)
; 8711 : }

  03970	5f		 pop	 edi
  03971	5e		 pop	 esi
  03972	5b		 pop	 ebx
  03973	8b 8c 24 28 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2092]
  0397a	33 cc		 xor	 ecx, esp
  0397c	e8 00 00 00 00	 call	 @__security_check_cookie@4
  03981	8b e5		 mov	 esp, ebp
  03983	5d		 pop	 ebp
  03984	c3		 ret	 0
$LL37@Railgun_Qu@12:

; 8242 :             return(NULL);
; 8243 :     }
; 8244 : } else {
; 8245 : }
; 8246 :     for ( ;; )
; 8247 :     {
; 8248 :         // The line below gives for 'cbPattern'>=1:
; 8249 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 8250 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 8251 : /*
; 8252 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 8253 :             return((long)(pbTarget-cbPattern));
; 8254 : */
; 8255 : 
; 8256 :         // The fragment below gives for 'cbPattern'>=2:
; 8257 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 8258 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 8259 : 
; 8260 : /*
; 8261 : //For 2 and 3 [
; 8262 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 8263 : //         count = countSTATIC;
; 8264 :          count = cbPattern-2;
; 8265 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 8266 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 8267 :                count--;
; 8268 :          }
; 8269 :          if ( count == 0) return((pbTarget-cbPattern));
; 8270 :         }
; 8271 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 8272 : //For 2 and 3 ]
; 8273 : */
; 8274 : 
; 8275 : 
; 8276 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  03985	0f be 53 fe	 movsx	 edx, BYTE PTR [ebx-2]
  03989	0f be 73 ff	 movsx	 esi, BYTE PTR [ebx-1]
  0398d	c1 e2 08	 shl	 edx, 8
  03990	03 d6		 add	 edx, esi
  03992	3b c2		 cmp	 eax, edx
  03994	75 06		 jne	 SHORT $LN35@Railgun_Qu@12

; 8277 :             Railgunhits++; //return((pbTarget-2));

  03996	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN35@Railgun_Qu@12:

; 8278 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  0399c	3a 4b ff	 cmp	 cl, BYTE PTR [ebx-1]
  0399f	74 01		 je	 SHORT $LN34@Railgun_Qu@12
  039a1	43		 inc	 ebx
$LN34@Railgun_Qu@12:

; 8279 : 
; 8280 : 
; 8281 :         // The fragment below gives for 'cbPattern'>=2:
; 8282 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 8283 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 8284 : /*
; 8285 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 8286 :          count = countSTATIC>>2;
; 8287 :          countRemainder = countSTATIC % 4;
; 8288 : 
; 8289 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 8290 :                count--;
; 8291 :          }
; 8292 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 8293 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 8294 :                countRemainder--;
; 8295 :          }
; 8296 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 8297 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 8298 :          //}
; 8299 :         }
; 8300 : */
; 8301 : 
; 8302 :         pbTarget++;

  039a2	43		 inc	 ebx

; 8303 :         if (pbTarget > pbTargetMax)

  039a3	3b df		 cmp	 ebx, edi
  039a5	76 de		 jbe	 SHORT $LL37@Railgun_Qu@12

; 8493 : 
; 8494 : 
; 8495 : // Revision 7deuce vs 7, a short showdown
; 8496 : 
; 8497 : // Just wanted to see how a two barrel gun is gonna fire, (in fact how a search for two (choosing the bigger skip every time) patterns performs):
; 8498 : // Note1: Two skip tables are in use, the two patterns are: the original and the original one char(the-most-right) short. For example fast/fas, faster/faste, beautiful/beautifu as follows:
; 8499 : 
; 8500 : // r.7:
; 8501 : // Doing Search for Pattern(4bytes) into String(206908949bytes) as-one-line ...
; 8502 : // Input Pattern(up to 19+2000 chars): fast
; 8503 : // Performance(bigger-the-better): 377%, 54788054 skips
; 8504 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 5945/220
; 8505 : // Railgun_Quadruplet_7 performance: 918KB/clock
; 8506 : 
; 8507 : // r.7deuce:
; 8508 : // Doing Search for Pattern(4bytes) into String(206908949bytes) as-one-line ...
; 8509 : // Input Pattern(up to 19+2000 chars): fast
; 8510 : // Performance(bigger-the-better): 389%, 53138919 skips
; 8511 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 5945/363
; 8512 : // Railgun_Quadruplet_7deuce performance: 556KB/clock
; 8513 : 
; 8514 : // r.7:
; 8515 : // Doing Search for Pattern(6bytes) into String(206908949bytes) as-one-line ...
; 8516 : // Input Pattern(up to 19+2000 chars): faster
; 8517 : // Performance(bigger-the-better): 514%, 40194194 skips
; 8518 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 744/164
; 8519 : // Railgun_Quadruplet_7 performance: 1232KB/clock
; 8520 : 
; 8521 : // r.7deuce:
; 8522 : // Doing Search for Pattern(6bytes) into String(206908949bytes) as-one-line ...
; 8523 : // Input Pattern(up to 19+2000 chars): faster
; 8524 : // Performance(bigger-the-better): 567%, 36434006 skips
; 8525 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 744/314
; 8526 : // Railgun_Quadruplet_7deuce performance: 643KB/clock
; 8527 : 
; 8528 : // r.7:
; 8529 : // Doing Search for Pattern(9bytes) into String(206908949bytes) as-one-line ...
; 8530 : // Input Pattern(up to 19+2000 chars): beautiful
; 8531 : // Performance(bigger-the-better): 790%, 26174714 skips
; 8532 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 27958/114
; 8533 : // Railgun_Quadruplet_7 performance: 1772KB/clock
; 8534 : 
; 8535 : // r.7deuce:
; 8536 : // Doing Search for Pattern(9bytes) into String(206908949bytes) as-one-line ...
; 8537 : // Input Pattern(up to 19+2000 chars): beautiful
; 8538 : // Performance(bigger-the-better): 857%, 24117314 skips
; 8539 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 27958/216
; 8540 : // Railgun_Quadruplet_7deuce performance: 935KB/clock
; 8541 : 
; 8542 : // r.7:
; 8543 : // Doing Search for Pattern(15bytes) into String(206908949bytes) as-one-line ...
; 8544 : // Input Pattern(up to 19+2000 chars): beautiful dress
; 8545 : // Performance(bigger-the-better): 869%, 23787030 skips
; 8546 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 11/107
; 8547 : // Railgun_Quadruplet_7 performance: 1888KB/clock
; 8548 : 
; 8549 : // r.7deuce:
; 8550 : // Doing Search for Pattern(15bytes) into String(206908949bytes) as-one-line ...
; 8551 : // Input Pattern(up to 19+2000 chars): beautiful dress
; 8552 : // Performance(bigger-the-better): 1093%, 18928081 skips
; 8553 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 11/198
; 8554 : // Railgun_Quadruplet_7deuce performance: 1020KB/clock
; 8555 : 
; 8556 : // Note2: Lower number of skips means bigger strides, to traverse the distance effectively requires two things: to make bigger strides and to make them faster.
; 8557 : // Note3: Revision 7deuce is nastily slower when compared to r.7 but stronger(the impact from bad scenarios is lower), Pentium Merom 2166Mhz is used.
; 8558 : // Note4: The firing-test shows that adding a single if-else fragment leads to almost two times speed-performance-degradation.
; 8559 : 
; 8560 : // ; 3217 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] )
; 8561 : // 
; 8562 : //   011ab	8b 54 24 24	 mov	 edx, DWORD PTR tv689[esp+2104]
; 8563 : //   011af	0f b6 0c 02	 movzx	 ecx, BYTE PTR [edx+eax]
; 8564 : //   011b3	8b 54 24 28	 mov	 edx, DWORD PTR tv698[esp+2104]
; 8565 : //   011b7	0f b6 14 02	 movzx	 edx, BYTE PTR [edx+eax]
; 8566 : //   011bb	8b 4c 8c 30	 mov	 ecx, DWORD PTR _bm_bc2nd$[esp+ecx*4+2104]
; 8567 : //   011bf	8b 94 94 30 04
; 8568 : // 	00 00		 mov	 edx, DWORD PTR _bm_bc$[esp+edx*4+2104]
; 8569 : //   011c6	3b d1		 cmp	 edx, ecx
; 8570 : //   011c8	7d 04		 jge	 SHORT $LN2@Railgun_Qu@5
; 8571 : // 
; 8572 : // ; 3218 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]];
; 8573 : // 
; 8574 : //   011ca	03 c1		 add	 eax, ecx
; 8575 : // 
; 8576 : // ; 3219 : else
; 8577 : // 
; 8578 : //   011cc	eb 02		 jmp	 SHORT $LN1@Railgun_Qu@5
; 8579 : // $LN2@Railgun_Qu@5:
; 8580 : // 
; 8581 : // ; 3220 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8582 : // 
; 8583 : //   011ce	03 c2		 add	 eax, edx
; 8584 : // $LN1@Railgun_Qu@5:
; 8585 : 
; 8586 : // Note5: I wonder how i7 will handle these (so many) memory accesses, in other words whether these ugly speed-performance ratios 1232/643=1.91:1 ('faster' pattern) and 1772/935=1.89:1 ('beautiful' pattern) will remain.
; 8587 : 
; 8588 : 
; 8589 : 
; 8590 : 
; 8591 : 
; 8592 : 
; 8593 : 
; 8594 : 
; 8595 : 
; 8596 : 
; 8597 : /*
; 8598 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 8599 : 
; 8600 :     i=0;
; 8601 :     while (i <= cbTarget-cbPattern) {
; 8602 :        //ch=pbTarget[i+cbPattern-1];
; 8603 :        //ch=pbTarget[i];
; 8604 :           //if ( pbTarget[i] == pbPattern[0] && *(unsigned long *)&pbTarget[i+cbPattern-1-3] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8605 : //          if ( *(unsigned long *)&pbTarget[i] == ulHashPattern ) // The lesson I learned from r.7- now applied in r.7: instead of extracting 'ch' having higher address now the lower address is extracted first in order (hopefully, the test confirms it) the next 32bytes (including 'ch') to be cached i.e. to comparison part is faster.
; 8606 : ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8607 : //ch = (unsigned char)(ulHashTarget>>24);
; 8608 : //ch = (unsigned char)pbTarget[i+3];
; 8609 : //ch = (unsigned char)bm_bc2nd[(unsigned char)pbTarget[i+3]];
; 8610 : //ch = (unsigned char)bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8611 : 
; 8612 :          if ( ulHashTarget == ulHashPattern)
; 8613 :              {
; 8614 :          count = countSTATIC;
; 8615 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8616 :                count--;
; 8617 :          }
; 8618 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8619 : 	     }
; 8620 : 
; 8621 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)(ulHashTarget>>24)] ) // 1383KB 'beautiful'
; 8622 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+3]] ) // 1413KB 'beautiful'
; 8623 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < 4 ) // 1433KB 'beautiful'
; 8624 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+3]];
; 8625 : else
; 8626 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8627 : 
; 8628 :     }
; 8629 : */
; 8630 : 
; 8631 : 
; 8632 : 
; 8633 : 
; 8634 : 
; 8635 : 
; 8636 : 
; 8637 : 
; 8638 : 
; 8639 : 
; 8640 : 
; 8641 : /*
; 8642 :     for (j=cbPattern-1; j > 0; j--) bm_bc[pbPattern[j]]=j;             
; 8643 : ch = (unsigned char)bm_bc[pbPattern[0]];
; 8644 : 
; 8645 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8646 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 
; 8647 : 
; 8648 : if (ch > (unsigned char)bm_bc[pbPattern[cbPattern-1]]) {
; 8649 : 
; 8650 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8651 :     for (j=cbPattern-1; j > 0; j--) bm_bc[pbPattern[j]]=j; // Restore backward state
; 8652 : 
; 8653 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 8654 : 
; 8655 : // Backward [
; 8656 :     i=(cbTarget-cbPattern);
; 8657 :     while (i >= 0) {
; 8658 :        //ch=pbTarget[i+cbPattern-1];
; 8659 : //       ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8660 :        ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8661 :           if (ulHashTarget == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8662 :              {
; 8663 :          count = countSTATIC;
; 8664 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8665 :                count--;
; 8666 :          }
; 8667 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8668 : 	     }
; 8669 :        //i+=bm_bc[*chPTR]; // Twice as slow than the below line!
; 8670 : //       i+=bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8671 :          i-=bm_bc[(unsigned char)pbTarget[i]];
; 8672 : //         i-=bm_bc[(unsigned char)(ulHashTarget & 0xFF)]; // ?! superslow ?!
; 8673 : //         i-=bm_bc[*(unsigned char *)&ulHashTarget]; // ?! superslow ?!
; 8674 :     }
; 8675 : // Backward ]
; 8676 : 
; 8677 : } else {
; 8678 : 
; 8679 :     //for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8680 :     //for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; // Restore forward state
; 8681 : 
; 8682 :         ulHashPattern = *(unsigned long *)(pbPattern+cbPattern-1-3);
; 8683 : 
; 8684 : // Forward [
; 8685 :     //lastch=pbPattern[cbPattern-1];
; 8686 :     //firstch=pbPattern[0];
; 8687 :     i=0;
; 8688 :     while (i <= cbTarget-cbPattern) {
; 8689 :        //ch=pbTarget[i+cbPattern-1];
; 8690 : //       ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8691 :        ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8692 :           if (ulHashTarget == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8693 :              {
; 8694 :          count = countSTATIC;
; 8695 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)) == *(char *)(&pbTarget[i]+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8696 :                count--;
; 8697 :          }
; 8698 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8699 : 	     }
; 8700 :        //i+=bm_bc[*chPTR]; // Twice as slow than the below line!
; 8701 :        i+=bm_bc[(unsigned char)(ulHashTarget>>24)];
; 8702 :     }
; 8703 : // Forward ]
; 8704 : 
; 8705 : }
; 8706 : */
; 8707 : 
; 8708 :     return(NULL);

  039a7	33 c0		 xor	 eax, eax

; 8709 : } //if (cbTarget<961)
; 8710 : } //if ( cbPattern<4)
; 8711 : }

  039a9	5f		 pop	 edi
  039aa	5e		 pop	 esi
  039ab	5b		 pop	 ebx
  039ac	8b 8c 24 28 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2092]
  039b3	33 cc		 xor	 ecx, esp
  039b5	e8 00 00 00 00	 call	 @__security_check_cookie@4
  039ba	8b e5		 mov	 esp, ebp
  039bc	5d		 pop	 ebp
  039bd	c3		 ret	 0
$LN46@Railgun_Qu@12:

; 8304 :             return(NULL);
; 8305 :     }
; 8306 : } else { //if ( cbPattern<4)
; 8307 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  039be	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H
  039c3	0f 83 fe 00 00
	00		 jae	 $LN31@Railgun_Qu@12

; 8308 : {
; 8309 :         pbTarget = pbTarget+cbPattern;
; 8310 :         ulHashPattern = *(unsigned long *)(pbPattern);

  039c9	8b 06		 mov	 eax, DWORD PTR [esi]
  039cb	89 44 24 2c	 mov	 DWORD PTR _ulHashPattern$[esp+2104], eax

; 8311 : //        countSTATIC = cbPattern-1;
; 8312 : 
; 8313 :     //SINGLET = *(char *)(pbPattern);
; 8314 :     SINGLET = ulHashPattern & 0xFF;
; 8315 :     Quadruplet2nd = SINGLET<<8;

  039cf	0f b6 c0	 movzx	 eax, al
  039d2	8b c8		 mov	 ecx, eax
  039d4	c1 e1 08	 shl	 ecx, 8
  039d7	89 4c 24 28	 mov	 DWORD PTR _Quadruplet2nd$[esp+2104], ecx

; 8316 :     Quadruplet3rd = SINGLET<<16;

  039db	8b c8		 mov	 ecx, eax
  039dd	03 da		 add	 ebx, edx
  039df	c1 e1 10	 shl	 ecx, 16			; 00000010H
  039e2	89 44 24 1c	 mov	 DWORD PTR tv663[esp+2104], eax

; 8317 :     Quadruplet4th = SINGLET<<24;

  039e6	c1 e0 18	 shl	 eax, 24			; 00000018H
  039e9	89 5d 08	 mov	 DWORD PTR _pbTarget$[ebp], ebx
  039ec	89 4c 24 24	 mov	 DWORD PTR _Quadruplet3rd$[esp+2104], ecx
  039f0	89 44 24 18	 mov	 DWORD PTR _Quadruplet4th$[esp+2104], eax
$LN30@Railgun_Qu@12:

; 8318 : 
; 8319 :     for ( ;; )
; 8320 :     {
; 8321 : 	AdvanceHopperGrass = 0;
; 8322 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  039f4	8b c3		 mov	 eax, ebx
  039f6	2b c2		 sub	 eax, edx
  039f8	8b 00		 mov	 eax, DWORD PTR [eax]
  039fa	c7 44 24 10 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], 0

; 8323 : 
; 8324 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  03a02	39 44 24 2c	 cmp	 DWORD PTR _ulHashPattern$[esp+2104], eax
  03a06	75 54		 jne	 SHORT $LN28@Railgun_Qu@12

; 8325 : //         count = countSTATIC;
; 8326 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 8327 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 8328 : //               count--;
; 8329 : //         }
; 8330 :          count = cbPattern-1;

  03a08	8d 42 ff	 lea	 eax, DWORD PTR [edx-1]

; 8331 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  03a0b	85 c0		 test	 eax, eax
  03a0d	74 45		 je	 SHORT $LN77@Railgun_Qu@12

; 8325 : //         count = countSTATIC;
; 8326 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 8327 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 8328 : //               count--;
; 8329 : //         }
; 8330 :          count = cbPattern-1;

  03a0f	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
  03a13	8b fb		 mov	 edi, ebx
  03a15	2b f0		 sub	 esi, eax
  03a17	2b f8		 sub	 edi, eax
  03a19	03 f2		 add	 esi, edx
  03a1b	eb 03 8d 49 00	 npad	 5
$LL27@Railgun_Qu@12:

; 8331 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  03a20	8a 0f		 mov	 cl, BYTE PTR [edi]
  03a22	38 0e		 cmp	 BYTE PTR [esi], cl
  03a24	75 2a		 jne	 SHORT $LN26@Railgun_Qu@12

; 8332 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  03a26	8b 5c 24 10	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+2104]
  03a2a	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  03a2d	03 d8		 add	 ebx, eax
  03a2f	3b cb		 cmp	 ecx, ebx
  03a31	75 0d		 jne	 SHORT $LN25@Railgun_Qu@12
  03a33	0f be 0f	 movsx	 ecx, BYTE PTR [edi]
  03a36	39 4c 24 1c	 cmp	 DWORD PTR tv663[esp+2104], ecx
  03a3a	74 04		 je	 SHORT $LN25@Railgun_Qu@12
  03a3c	ff 44 24 10	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+2104]
$LN25@Railgun_Qu@12:

; 8333 :                count--;
; 8334 :          }
; 8335 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  03a40	8b 5d 08	 mov	 ebx, DWORD PTR _pbTarget$[ebp]
  03a43	46		 inc	 esi
  03a44	47		 inc	 edi
  03a45	48		 dec	 eax
  03a46	75 d8		 jne	 SHORT $LL27@Railgun_Qu@12
  03a48	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 8336 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  03a4e	eb 4b		 jmp	 SHORT $LN20@Railgun_Qu@12
$LN26@Railgun_Qu@12:

; 8333 :                count--;
; 8334 :          }
; 8335 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  03a50	85 c0		 test	 eax, eax
  03a52	75 47		 jne	 SHORT $LN20@Railgun_Qu@12
$LN77@Railgun_Qu@12:
  03a54	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 8336 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  03a5a	eb 3f		 jmp	 SHORT $LN20@Railgun_Qu@12
$LN28@Railgun_Qu@12:

; 8337 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  03a5c	8b c8		 mov	 ecx, eax
  03a5e	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  03a64	39 4c 24 28	 cmp	 DWORD PTR _Quadruplet2nd$[esp+2104], ecx
  03a68	74 31		 je	 SHORT $LN20@Railgun_Qu@12

; 8338 :          AdvanceHopperGrass++;
; 8339 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  03a6a	8b c8		 mov	 ecx, eax
  03a6c	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  03a72	c7 44 24 10 01
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], 1
  03a7a	39 4c 24 24	 cmp	 DWORD PTR _Quadruplet3rd$[esp+2104], ecx
  03a7e	74 1b		 je	 SHORT $LN20@Railgun_Qu@12

; 8340 :               AdvanceHopperGrass++;
; 8341 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  03a80	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  03a85	c7 44 24 10 02
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], 2
  03a8d	39 44 24 18	 cmp	 DWORD PTR _Quadruplet4th$[esp+2104], eax
  03a91	74 08		 je	 SHORT $LN20@Railgun_Qu@12
  03a93	c7 44 24 10 03
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], 3
$LN20@Railgun_Qu@12:

; 8342 :          }
; 8343 :     }
; 8344 : 	}
; 8345 : 
; 8346 : 	AdvanceHopperGrass++;
; 8347 : 
; 8348 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  03a9b	8b 44 24 10	 mov	 eax, DWORD PTR _AdvanceHopperGrass$[esp+2104]
  03a9f	8d 5c 03 01	 lea	 ebx, DWORD PTR [ebx+eax+1]
  03aa3	89 5d 08	 mov	 DWORD PTR _pbTarget$[ebp], ebx

; 8349 :         if (pbTarget > pbTargetMax)

  03aa6	3b 5c 24 20	 cmp	 ebx, DWORD PTR _pbTargetMax$[esp+2104]
  03aaa	0f 86 44 ff ff
	ff		 jbe	 $LN30@Railgun_Qu@12

; 8493 : 
; 8494 : 
; 8495 : // Revision 7deuce vs 7, a short showdown
; 8496 : 
; 8497 : // Just wanted to see how a two barrel gun is gonna fire, (in fact how a search for two (choosing the bigger skip every time) patterns performs):
; 8498 : // Note1: Two skip tables are in use, the two patterns are: the original and the original one char(the-most-right) short. For example fast/fas, faster/faste, beautiful/beautifu as follows:
; 8499 : 
; 8500 : // r.7:
; 8501 : // Doing Search for Pattern(4bytes) into String(206908949bytes) as-one-line ...
; 8502 : // Input Pattern(up to 19+2000 chars): fast
; 8503 : // Performance(bigger-the-better): 377%, 54788054 skips
; 8504 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 5945/220
; 8505 : // Railgun_Quadruplet_7 performance: 918KB/clock
; 8506 : 
; 8507 : // r.7deuce:
; 8508 : // Doing Search for Pattern(4bytes) into String(206908949bytes) as-one-line ...
; 8509 : // Input Pattern(up to 19+2000 chars): fast
; 8510 : // Performance(bigger-the-better): 389%, 53138919 skips
; 8511 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 5945/363
; 8512 : // Railgun_Quadruplet_7deuce performance: 556KB/clock
; 8513 : 
; 8514 : // r.7:
; 8515 : // Doing Search for Pattern(6bytes) into String(206908949bytes) as-one-line ...
; 8516 : // Input Pattern(up to 19+2000 chars): faster
; 8517 : // Performance(bigger-the-better): 514%, 40194194 skips
; 8518 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 744/164
; 8519 : // Railgun_Quadruplet_7 performance: 1232KB/clock
; 8520 : 
; 8521 : // r.7deuce:
; 8522 : // Doing Search for Pattern(6bytes) into String(206908949bytes) as-one-line ...
; 8523 : // Input Pattern(up to 19+2000 chars): faster
; 8524 : // Performance(bigger-the-better): 567%, 36434006 skips
; 8525 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 744/314
; 8526 : // Railgun_Quadruplet_7deuce performance: 643KB/clock
; 8527 : 
; 8528 : // r.7:
; 8529 : // Doing Search for Pattern(9bytes) into String(206908949bytes) as-one-line ...
; 8530 : // Input Pattern(up to 19+2000 chars): beautiful
; 8531 : // Performance(bigger-the-better): 790%, 26174714 skips
; 8532 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 27958/114
; 8533 : // Railgun_Quadruplet_7 performance: 1772KB/clock
; 8534 : 
; 8535 : // r.7deuce:
; 8536 : // Doing Search for Pattern(9bytes) into String(206908949bytes) as-one-line ...
; 8537 : // Input Pattern(up to 19+2000 chars): beautiful
; 8538 : // Performance(bigger-the-better): 857%, 24117314 skips
; 8539 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 27958/216
; 8540 : // Railgun_Quadruplet_7deuce performance: 935KB/clock
; 8541 : 
; 8542 : // r.7:
; 8543 : // Doing Search for Pattern(15bytes) into String(206908949bytes) as-one-line ...
; 8544 : // Input Pattern(up to 19+2000 chars): beautiful dress
; 8545 : // Performance(bigger-the-better): 869%, 23787030 skips
; 8546 : // Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: 11/107
; 8547 : // Railgun_Quadruplet_7 performance: 1888KB/clock
; 8548 : 
; 8549 : // r.7deuce:
; 8550 : // Doing Search for Pattern(15bytes) into String(206908949bytes) as-one-line ...
; 8551 : // Input Pattern(up to 19+2000 chars): beautiful dress
; 8552 : // Performance(bigger-the-better): 1093%, 18928081 skips
; 8553 : // Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: 11/198
; 8554 : // Railgun_Quadruplet_7deuce performance: 1020KB/clock
; 8555 : 
; 8556 : // Note2: Lower number of skips means bigger strides, to traverse the distance effectively requires two things: to make bigger strides and to make them faster.
; 8557 : // Note3: Revision 7deuce is nastily slower when compared to r.7 but stronger(the impact from bad scenarios is lower), Pentium Merom 2166Mhz is used.
; 8558 : // Note4: The firing-test shows that adding a single if-else fragment leads to almost two times speed-performance-degradation.
; 8559 : 
; 8560 : // ; 3217 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] )
; 8561 : // 
; 8562 : //   011ab	8b 54 24 24	 mov	 edx, DWORD PTR tv689[esp+2104]
; 8563 : //   011af	0f b6 0c 02	 movzx	 ecx, BYTE PTR [edx+eax]
; 8564 : //   011b3	8b 54 24 28	 mov	 edx, DWORD PTR tv698[esp+2104]
; 8565 : //   011b7	0f b6 14 02	 movzx	 edx, BYTE PTR [edx+eax]
; 8566 : //   011bb	8b 4c 8c 30	 mov	 ecx, DWORD PTR _bm_bc2nd$[esp+ecx*4+2104]
; 8567 : //   011bf	8b 94 94 30 04
; 8568 : // 	00 00		 mov	 edx, DWORD PTR _bm_bc$[esp+edx*4+2104]
; 8569 : //   011c6	3b d1		 cmp	 edx, ecx
; 8570 : //   011c8	7d 04		 jge	 SHORT $LN2@Railgun_Qu@5
; 8571 : // 
; 8572 : // ; 3218 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]];
; 8573 : // 
; 8574 : //   011ca	03 c1		 add	 eax, ecx
; 8575 : // 
; 8576 : // ; 3219 : else
; 8577 : // 
; 8578 : //   011cc	eb 02		 jmp	 SHORT $LN1@Railgun_Qu@5
; 8579 : // $LN2@Railgun_Qu@5:
; 8580 : // 
; 8581 : // ; 3220 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8582 : // 
; 8583 : //   011ce	03 c2		 add	 eax, edx
; 8584 : // $LN1@Railgun_Qu@5:
; 8585 : 
; 8586 : // Note5: I wonder how i7 will handle these (so many) memory accesses, in other words whether these ugly speed-performance ratios 1232/643=1.91:1 ('faster' pattern) and 1772/935=1.89:1 ('beautiful' pattern) will remain.
; 8587 : 
; 8588 : 
; 8589 : 
; 8590 : 
; 8591 : 
; 8592 : 
; 8593 : 
; 8594 : 
; 8595 : 
; 8596 : 
; 8597 : /*
; 8598 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 8599 : 
; 8600 :     i=0;
; 8601 :     while (i <= cbTarget-cbPattern) {
; 8602 :        //ch=pbTarget[i+cbPattern-1];
; 8603 :        //ch=pbTarget[i];
; 8604 :           //if ( pbTarget[i] == pbPattern[0] && *(unsigned long *)&pbTarget[i+cbPattern-1-3] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8605 : //          if ( *(unsigned long *)&pbTarget[i] == ulHashPattern ) // The lesson I learned from r.7- now applied in r.7: instead of extracting 'ch' having higher address now the lower address is extracted first in order (hopefully, the test confirms it) the next 32bytes (including 'ch') to be cached i.e. to comparison part is faster.
; 8606 : ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8607 : //ch = (unsigned char)(ulHashTarget>>24);
; 8608 : //ch = (unsigned char)pbTarget[i+3];
; 8609 : //ch = (unsigned char)bm_bc2nd[(unsigned char)pbTarget[i+3]];
; 8610 : //ch = (unsigned char)bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8611 : 
; 8612 :          if ( ulHashTarget == ulHashPattern)
; 8613 :              {
; 8614 :          count = countSTATIC;
; 8615 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8616 :                count--;
; 8617 :          }
; 8618 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8619 : 	     }
; 8620 : 
; 8621 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)(ulHashTarget>>24)] ) // 1383KB 'beautiful'
; 8622 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+3]] ) // 1413KB 'beautiful'
; 8623 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < 4 ) // 1433KB 'beautiful'
; 8624 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+3]];
; 8625 : else
; 8626 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8627 : 
; 8628 :     }
; 8629 : */
; 8630 : 
; 8631 : 
; 8632 : 
; 8633 : 
; 8634 : 
; 8635 : 
; 8636 : 
; 8637 : 
; 8638 : 
; 8639 : 
; 8640 : 
; 8641 : /*
; 8642 :     for (j=cbPattern-1; j > 0; j--) bm_bc[pbPattern[j]]=j;             
; 8643 : ch = (unsigned char)bm_bc[pbPattern[0]];
; 8644 : 
; 8645 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8646 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 
; 8647 : 
; 8648 : if (ch > (unsigned char)bm_bc[pbPattern[cbPattern-1]]) {
; 8649 : 
; 8650 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8651 :     for (j=cbPattern-1; j > 0; j--) bm_bc[pbPattern[j]]=j; // Restore backward state
; 8652 : 
; 8653 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 8654 : 
; 8655 : // Backward [
; 8656 :     i=(cbTarget-cbPattern);
; 8657 :     while (i >= 0) {
; 8658 :        //ch=pbTarget[i+cbPattern-1];
; 8659 : //       ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8660 :        ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8661 :           if (ulHashTarget == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8662 :              {
; 8663 :          count = countSTATIC;
; 8664 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8665 :                count--;
; 8666 :          }
; 8667 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8668 : 	     }
; 8669 :        //i+=bm_bc[*chPTR]; // Twice as slow than the below line!
; 8670 : //       i+=bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8671 :          i-=bm_bc[(unsigned char)pbTarget[i]];
; 8672 : //         i-=bm_bc[(unsigned char)(ulHashTarget & 0xFF)]; // ?! superslow ?!
; 8673 : //         i-=bm_bc[*(unsigned char *)&ulHashTarget]; // ?! superslow ?!
; 8674 :     }
; 8675 : // Backward ]
; 8676 : 
; 8677 : } else {
; 8678 : 
; 8679 :     //for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;
; 8680 :     //for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; // Restore forward state
; 8681 : 
; 8682 :         ulHashPattern = *(unsigned long *)(pbPattern+cbPattern-1-3);
; 8683 : 
; 8684 : // Forward [
; 8685 :     //lastch=pbPattern[cbPattern-1];
; 8686 :     //firstch=pbPattern[0];
; 8687 :     i=0;
; 8688 :     while (i <= cbTarget-cbPattern) {
; 8689 :        //ch=pbTarget[i+cbPattern-1];
; 8690 : //       ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8691 :        ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8692 :           if (ulHashTarget == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8693 :              {
; 8694 :          count = countSTATIC;
; 8695 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)) == *(char *)(&pbTarget[i]+(countSTATIC-count)) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.
; 8696 :                count--;
; 8697 :          }
; 8698 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);
; 8699 : 	     }
; 8700 :        //i+=bm_bc[*chPTR]; // Twice as slow than the below line!
; 8701 :        i+=bm_bc[(unsigned char)(ulHashTarget>>24)];
; 8702 :     }
; 8703 : // Forward ]
; 8704 : 
; 8705 : }
; 8706 : */
; 8707 : 
; 8708 :     return(NULL);

  03ab0	33 c0		 xor	 eax, eax

; 8709 : } //if (cbTarget<961)
; 8710 : } //if ( cbPattern<4)
; 8711 : }

  03ab2	5f		 pop	 edi
  03ab3	5e		 pop	 esi
  03ab4	5b		 pop	 ebx
  03ab5	8b 8c 24 28 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2092]
  03abc	33 cc		 xor	 ecx, esp
  03abe	e8 00 00 00 00	 call	 @__security_check_cookie@4
  03ac3	8b e5		 mov	 esp, ebp
  03ac5	5d		 pop	 ebp
  03ac6	c3		 ret	 0
$LN31@Railgun_Qu@12:

; 8350 :             return(NULL);
; 8351 :     }
; 8352 : } else { //if (cbTarget<961)
; 8353 :         //countSTATIC = cbPattern-2; //r.6+
; 8354 :         //countSTATIC = cbPattern-2-3;
; 8355 :         //countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!
; 8356 :         //countSTATIC = cbPattern-2-3; // r.7- At last no recompared bytes in-between chars
; 8357 :         countSTATIC = cbPattern-2-2; // r.7 

  03ac7	8d 4a fc	 lea	 ecx, DWORD PTR [edx-4]
  03aca	89 4c 24 18	 mov	 DWORD PTR _countSTATIC$[esp+2104], ecx
  03ace	8d 42 ff	 lea	 eax, DWORD PTR [edx-1]

; 8358 : 
; 8359 :         //chPTR=(unsigned char *)&chchchch+3;
; 8360 : // Next line fixes the BUG from r.6++: but with awful speed degradation! So the bug is fixed in the definitions by setting 'countSTATIC = cbPattern-2-2;', bug appears only for patterns with lengths of 4, The setback is one unnecessary comparison for 5bytes patterns, stupidly such setback exists (from before) for 4bytes as well.
; 8361 : //if (countSTATIC<0) countSTATIC=0;
; 8362 :     /* Preprocessing */
; 8363 :     for (a=0; a < ASIZE; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern-3+(2);}

  03ad1	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  03ad6	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc2nd$[esp+2104]
  03ada	f3 ab		 rep stosd
  03adc	8b c2		 mov	 eax, edx
  03ade	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  03ae3	8d bc 24 30 04
	00 00		 lea	 edi, DWORD PTR _bm_bc$[esp+2104]
  03aea	f3 ab		 rep stosd

; 8364 : //    for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; // 'ABCD' ABC?  A/D jump with 3/4
; 8365 : //    for (j=cbPattern-1; j > 0; j--) bm_bc[pbPattern[j]]=j;             // 'ABCD' ?BCD  A/D jump with 4/3
; 8366 : 
; 8367 : 
; 8368 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 

  03aec	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  03aef	33 c0		 xor	 eax, eax
  03af1	85 c9		 test	 ecx, ecx
  03af3	74 20		 je	 SHORT $LN12@Railgun_Qu@12
  03af5	8d 7a ff	 lea	 edi, DWORD PTR [edx-1]
  03af8	eb 06 8d 9b 00
	00 00 00	 npad	 8
$LL101@Railgun_Qu@12:
  03b00	0f be 34 06	 movsx	 esi, BYTE PTR [esi+eax]
  03b04	89 bc b4 30 04
	00 00		 mov	 DWORD PTR _bm_bc$[esp+esi*4+2104], edi
  03b0b	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
  03b0f	40		 inc	 eax
  03b10	4f		 dec	 edi
  03b11	3b c1		 cmp	 eax, ecx
  03b13	72 eb		 jb	 SHORT $LL101@Railgun_Qu@12
$LN12@Railgun_Qu@12:

; 8369 :     for (j=0; j < (cbPattern-3+(2))-1; j++) bm_bc2nd[pbPattern[j]]=(cbPattern-3+(2))-j-1; 

  03b15	8d 4a fe	 lea	 ecx, DWORD PTR [edx-2]
  03b18	33 c0		 xor	 eax, eax
  03b1a	85 c9		 test	 ecx, ecx
  03b1c	74 14		 je	 SHORT $LN9@Railgun_Qu@12
  03b1e	8d 4a fe	 lea	 ecx, DWORD PTR [edx-2]
$LL11@Railgun_Qu@12:
  03b21	0f be 3c 06	 movsx	 edi, BYTE PTR [esi+eax]
  03b25	89 4c bc 30	 mov	 DWORD PTR _bm_bc2nd$[esp+edi*4+2104], ecx
  03b29	40		 inc	 eax
  03b2a	8d 7a fe	 lea	 edi, DWORD PTR [edx-2]
  03b2d	49		 dec	 ecx
  03b2e	3b c7		 cmp	 eax, edi
  03b30	72 ef		 jb	 SHORT $LL11@Railgun_Qu@12
$LN9@Railgun_Qu@12:

; 8370 : 
; 8371 : 
; 8372 : 
; 8373 : //        ulHashPattern = *(unsigned long *)(pbPattern+cbPattern-1-3);
; 8374 :         ulHashPattern = *(unsigned long *)(pbPattern);

  03b32	8b 06		 mov	 eax, DWORD PTR [esi]

; 8375 : 
; 8376 :     AdvanceHopperGrass = 0;
; 8377 :     i=0;
; 8378 :     while (i <= cbTarget-cbPattern) {

  03b34	8b 4c 24 1c	 mov	 ecx, DWORD PTR _cbTarget$GSCopy$[esp+2104]
  03b38	89 44 24 2c	 mov	 DWORD PTR _ulHashPattern$[esp+2104], eax
  03b3c	33 c0		 xor	 eax, eax
  03b3e	2b ca		 sub	 ecx, edx
  03b40	89 4c 24 20	 mov	 DWORD PTR $T10457[esp+2104], ecx
  03b44	8d 4c 13 fe	 lea	 ecx, DWORD PTR [ebx+edx-2]
  03b48	8d 54 13 ff	 lea	 edx, DWORD PTR [ebx+edx-1]
  03b4c	89 44 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2104], eax
  03b50	89 4c 24 24	 mov	 DWORD PTR tv695[esp+2104], ecx
  03b54	89 54 24 28	 mov	 DWORD PTR tv704[esp+2104], edx
$LN8@Railgun_Qu@12:

; 8379 :        //ch=pbTarget[i+cbPattern-1];
; 8380 :        //ch=pbTarget[i];
; 8381 :           //if ( pbTarget[i] == pbPattern[0] && *(unsigned long *)&pbTarget[i+cbPattern-1-3] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 8382 : //          if ( *(unsigned long *)&pbTarget[i] == ulHashPattern ) // The lesson I learned from r.7- now applied in r.7: instead of extracting 'ch' having higher address now the lower address is extracted first in order (hopefully, the test confirms it) the next 32bytes (including 'ch') to be cached i.e. to comparison part is faster.
; 8383 : //ulHashTarget=*(unsigned long *)&pbTarget[i+cbPattern-1-3];
; 8384 : ulHashTarget=*(unsigned long *)&pbTarget[i];
; 8385 : //ch = (unsigned char)(ulHashTarget>>24);
; 8386 : //ch = (unsigned char)pbTarget[i+3];
; 8387 : //ch = (unsigned char)bm_bc2nd[(unsigned char)pbTarget[i+3]];
; 8388 : //ch = (unsigned char)bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8389 : 
; 8390 :          if ( ulHashTarget == ulHashPattern)

  03b58	8b 4c 24 2c	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+2104]
  03b5c	39 0c 18	 cmp	 DWORD PTR [eax+ebx], ecx
  03b5f	75 3a		 jne	 SHORT $LN3@Railgun_Qu@12

; 8391 :              {
; 8392 :          count = countSTATIC;

  03b61	8b 7c 24 18	 mov	 edi, DWORD PTR _countSTATIC$[esp+2104]

; 8393 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  03b65	85 ff		 test	 edi, edi
  03b67	74 26		 je	 SHORT $LN76@Railgun_Qu@12

; 8391 :              {
; 8392 :          count = countSTATIC;

  03b69	8d 56 04	 lea	 edx, DWORD PTR [esi+4]
  03b6c	8d 74 18 04	 lea	 esi, DWORD PTR [eax+ebx+4]
$LL5@Railgun_Qu@12:

; 8393 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  03b70	8a 0a		 mov	 cl, BYTE PTR [edx]
  03b72	3a 0e		 cmp	 cl, BYTE PTR [esi]
  03b74	75 11		 jne	 SHORT $LN4@Railgun_Qu@12

; 8394 :                count--;

  03b76	46		 inc	 esi
  03b77	42		 inc	 edx
  03b78	4f		 dec	 edi
  03b79	75 f5		 jne	 SHORT $LL5@Railgun_Qu@12

; 8395 :          }
; 8396 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  03b7b	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
  03b7f	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  03b85	eb 14		 jmp	 SHORT $LN3@Railgun_Qu@12
$LN4@Railgun_Qu@12:
  03b87	85 ff		 test	 edi, edi
  03b89	75 0c		 jne	 SHORT $LN100@Railgun_Qu@12
  03b8b	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
$LN76@Railgun_Qu@12:
  03b8f	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  03b95	eb 04		 jmp	 SHORT $LN3@Railgun_Qu@12
$LN100@Railgun_Qu@12:
  03b97	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+2104]
$LN3@Railgun_Qu@12:

; 8397 : 	     }
; 8398 : 
; 8399 : 
; 8400 : /*
; 8401 : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [
; 8402 : Input Pattern(up to 19+2000 chars): lesser
; 8403 : 
; 8404 : [
; 8405 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] )
; 8406 : //if ( pbTarget[i+cbPattern-1] == pbPattern[cbPattern-1-3+(2)] )
; 8407 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]];
; 8408 : else
; 8409 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8410 : 
; 8411 : Skip-Performance(bigger-the-better): 580%, 35625791 skips/iterations
; 8412 : Bozan_hits/Bozan_clocks: 229/261
; 8413 : Bozan performance: 774KB/clock
; 8414 : 
; 8415 : if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] )
; 8416 : {
; 8417 : //if ( pbTarget[i+cbPattern-1] == pbPattern[cbPattern-1-3+(2)] )
; 8418 : printf("%d,%d\n",bm_bc[(unsigned char)pbTarget[i+cbPattern-1]], bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]]);
; 8419 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]];
; 8420 : }
; 8421 : else
; 8422 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8423 : 
; 8424 : //      ?%
; 8425 : //  lesser
; 8426 : // 65432166
; 8427 : // 65122166
; 8428 : 
; 8429 : //  lesse
; 8430 : // 5432155
; 8431 : // 5431135
; 8432 : 
; 8433 : // 1,3 %<? e<e 
; 8434 : // 2,3 %<? s<e 
; 8435 : // 1,4 %<? e<l 
; 8436 : // 2,4 %<? s<l 
; 8437 : // 1,5 %<? e<Z(any non-pattern) 
; 8438 : // 2,5 %<? s<Z(any non-pattern) 
; 8439 : 
; 8440 : 35625791 vs 36285892 iterations means 0,660,101 less cycles!
; 8441 : 35625791 vs 38047818 iterations means 2,422,027 less cycles!
; 8442 : ]
; 8443 : 
; 8444 : [
; 8445 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] )
; 8446 : if ( pbTarget[i+cbPattern-1] == pbPattern[cbPattern-1-3+(2)] )
; 8447 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]];
; 8448 : else
; 8449 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8450 : 
; 8451 : Skip-Performance(bigger-the-better): 570%, 36285892 skips/iterations
; 8452 : Bozan_hits/Bozan_clocks: 229/208
; 8453 : Bozan performance: 971KB/clock
; 8454 : ]
; 8455 : 
; 8456 : [
; 8457 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] )
; 8458 : //if ( pbTarget[i+cbPattern-1] == pbPattern[cbPattern-1-3+(2)] )
; 8459 : //         i= i + bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]];
; 8460 : //else
; 8461 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8462 : 
; 8463 : Skip-Performance(bigger-the-better): 543%, 38047818 skips/iterations
; 8464 : Bozan_hits/Bozan_clocks: 229/148
; 8465 : Bozan performance: 1365KB/clock
; 8466 : ]
; 8467 : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ]
; 8468 : */
; 8469 : 
; 8470 : 
; 8471 : // Variant B
; 8472 : // Railgun_Quadruplet_7deuce 6x2 i.e. average performance: 1130KB/clock
; 8473 : // Railgun_Quadruplet_7deuce 6x2 i.e. average performance: 1124KB/clock
; 8474 : // Railgun_Quadruplet_7deuce 6x2 i.e. average performance: 1131KB/clock
; 8475 : // Variant A
; 8476 : // Railgun_Quadruplet_7deuce 6x2 i.e. average performance: 1121KB/clock
; 8477 : // Railgun_Quadruplet_7deuce 6x2 i.e. average performance: 1115KB/clock
; 8478 : // Railgun_Quadruplet_7deuce 6x2 i.e. average performance: 1121KB/clock
; 8479 : 
; 8480 : //if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] ) // Variant A
; 8481 : if ( bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]] > bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] ) // Variant B

  03b9b	8b 54 24 24	 mov	 edx, DWORD PTR tv695[esp+2104]
  03b9f	0f b6 0c 02	 movzx	 ecx, BYTE PTR [edx+eax]
  03ba3	8b 54 24 28	 mov	 edx, DWORD PTR tv704[esp+2104]
  03ba7	0f b6 14 02	 movzx	 edx, BYTE PTR [edx+eax]
  03bab	8b 4c 8c 30	 mov	 ecx, DWORD PTR _bm_bc2nd$[esp+ecx*4+2104]
  03baf	8b 94 94 30 04
	00 00		 mov	 edx, DWORD PTR _bm_bc$[esp+edx*4+2104]
  03bb6	3b ca		 cmp	 ecx, edx
  03bb8	7e 04		 jle	 SHORT $LN2@Railgun_Qu@12

; 8482 :          i= i + bm_bc2nd[(unsigned char)pbTarget[i+cbPattern-1-3+(2)]];

  03bba	03 c1		 add	 eax, ecx

; 8483 : else

  03bbc	eb 02		 jmp	 SHORT $LN1@Railgun_Qu@12
$LN2@Railgun_Qu@12:

; 8484 :          i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];

  03bbe	03 c2		 add	 eax, edx
$LN1@Railgun_Qu@12:

; 8485 : 
; 8486 : AdvanceHopperGrass++;

  03bc0	ff 44 24 10	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+2104]
  03bc4	3b 44 24 20	 cmp	 eax, DWORD PTR $T10457[esp+2104]
  03bc8	76 8e		 jbe	 SHORT $LN8@Railgun_Qu@12

; 8487 : 
; 8488 :     }
; 8489 : 
; 8490 : GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  03bca	8b 44 24 1c	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+2104]
  03bce	db 44 24 1c	 fild	 DWORD PTR _cbTarget$GSCopy$[esp+2104]
  03bd2	85 c0		 test	 eax, eax
  03bd4	79 06		 jns	 SHORT $LN110@Railgun_Qu@12
  03bd6	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN110@Railgun_Qu@12:
  03bdc	8b 4c 24 10	 mov	 ecx, DWORD PTR _AdvanceHopperGrass$[esp+2104]
  03be0	db 44 24 10	 fild	 DWORD PTR _AdvanceHopperGrass$[esp+2104]
  03be4	85 c9		 test	 ecx, ecx
  03be6	79 06		 jns	 SHORT $LN111@Railgun_Qu@12
  03be8	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN111@Railgun_Qu@12:
  03bee	de f9		 fdivp	 ST(1), ST(0)
  03bf0	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  03bf6	e8 00 00 00 00	 call	 __ftol2_sse
  03bfb	8b c8		 mov	 ecx, eax
  03bfd	99		 cdq
  03bfe	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 8491 : GlobalI += AdvanceHopperGrass;

  03c04	8b 44 24 10	 mov	 eax, DWORD PTR _AdvanceHopperGrass$[esp+2104]

; 8492 : printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);

  03c08	50		 push	 eax
  03c09	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  03c0f	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalI, eax
  03c15	51		 push	 ecx
  03c16	68 00 00 00 00	 push	 OFFSET $SG7165
  03c1b	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  03c22	e8 00 00 00 00	 call	 _printf
  03c27	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN112@Railgun_Qu@12:

; 8709 : } //if (cbTarget<961)
; 8710 : } //if ( cbPattern<4)
; 8711 : }

  03c2a	8b 8c 24 34 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2104]
  03c31	5f		 pop	 edi
  03c32	5e		 pop	 esi
  03c33	5b		 pop	 ebx
  03c34	33 cc		 xor	 ecx, esp
  03c36	33 c0		 xor	 eax, eax
  03c38	e8 00 00 00 00	 call	 @__security_check_cookie@4
  03c3d	8b e5		 mov	 esp, ebp
  03c3f	5d		 pop	 ebp
  03c40	c3		 ret	 0
_Railgun_Quadruplet_7deuce_count_hits ENDP
_TEXT	ENDS
PUBLIC	_cbTarget$GSCopy$
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7Trident_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_pbPattern$GSCopy$ = -68648				; size = 4
tv1400 = -68644						; size = 4
tv1321 = -68644						; size = 4
_pbTargetMax$ = -68644					; size = 4
_AdvanceHopperGrass$ = -68640				; size = 4
tv1488 = -68636						; size = 4
tv1486 = -68636						; size = 4
tv974 = -68636						; size = 4
tv770 = -68636						; size = 4
_Quadruplet4th$ = -68636				; size = 4
tv938 = -68632						; size = 4
_cbTarget$GSCopy$ = -68632				; size = 4
_countSTATIC$ = -68628					; size = 4
_Quadruplet2nd$ = -68628				; size = 4
_ulHashPattern$ = -68624				; size = 4
_Quadruplet3rd$ = -68620				; size = 4
_maskv$ = -68616					; size = 1024
_bm_bc2nd$ = -67592					; size = 1024
_bm_bc$ = -66568					; size = 1024
_bm_Horspool_Order2$ = -65544				; size = 65536
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7Trident_count_hits PROC

; 8719 : {

  03c50	55		 push	 ebp
  03c51	8b ec		 mov	 ebp, esp
  03c53	83 e4 f8	 and	 esp, -8			; fffffff8H
  03c56	b8 2c 0c 01 00	 mov	 eax, 68652		; 00010c2cH
  03c5b	e8 00 00 00 00	 call	 __chkstk
  03c60	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  03c65	33 c4		 xor	 eax, esp
  03c67	89 84 24 28 0c
	01 00		 mov	 DWORD PTR __$ArrayPad$[esp+68652], eax

; 8720 : 	char * pbTargetMax = pbTarget + cbTarget;

  03c6e	8b 45 0c	 mov	 eax, DWORD PTR _pbPattern$[ebp]
  03c71	53		 push	 ebx
  03c72	56		 push	 esi
  03c73	8b 75 08	 mov	 esi, DWORD PTR _pbTarget$[ebp]
  03c76	57		 push	 edi
  03c77	8b 7d 10	 mov	 edi, DWORD PTR _cbTarget$[ebp]

; 8721 : 	register unsigned long ulHashPattern;
; 8722 : 	register unsigned long ulHashTarget;
; 8723 : 	signed long count;
; 8724 : 	signed long countSTATIC;
; 8725 : 
; 8726 : 	unsigned char SINGLET;
; 8727 : 	unsigned long Quadruplet2nd;
; 8728 : 	unsigned long Quadruplet3rd;
; 8729 : 	unsigned long Quadruplet4th;
; 8730 : 
; 8731 : 	unsigned long  AdvanceHopperGrass;
; 8732 : 
; 8733 : 	long i; //BMH needed
; 8734 : 	int a, j;
; 8735 : 	unsigned int bm_bc[256]; //BMH needed
; 8736 : 	unsigned int bm_bc2nd[256]; //BMS needed
; 8737 : 	unsigned char bm_Horspool_Order2[256*256]; //BMHSS(Elsiane) needed, 'char' limits patterns to 255, if 'long' then table becomes 256KB, grrr.
; 8738 : 	unsigned long Gulliver; // or unsigned char or unsigned short
; 8739 : 
; 8740 :     // Trident i.e. BNDM reinforced [
; 8741 :     uint8_t    *tgt = (uint8_t*)pbTarget, *pat = (uint8_t*)pbPattern;
; 8742 :     //int        i, j;
; 8743 :     uint32_t   mask, maskv[256] = {0};

  03c7a	68 fc 03 00 00	 push	 1020			; 000003fcH
  03c7f	8d 54 24 38	 lea	 edx, DWORD PTR _maskv$[esp+68672]
  03c83	8d 0c 37	 lea	 ecx, DWORD PTR [edi+esi]
  03c86	6a 00		 push	 0
  03c88	52		 push	 edx
  03c89	89 44 24 1c	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+68676], eax

; 9014 : 					count = countSTATIC;

  03c8d	89 7c 24 2c	 mov	 DWORD PTR _cbTarget$GSCopy$[esp+68676], edi
  03c91	89 4c 24 20	 mov	 DWORD PTR _pbTargetMax$[esp+68676], ecx
  03c95	c7 44 24 3c 00
	00 00 00	 mov	 DWORD PTR _maskv$[esp+68676], 0
  03c9d	e8 00 00 00 00	 call	 _memset
  03ca2	8b 5d 14	 mov	 ebx, DWORD PTR _cbPattern$[ebp]
  03ca5	83 c4 0c	 add	 esp, 12			; 0000000cH
  03ca8	3b df		 cmp	 ebx, edi
  03caa	0f 87 23 04 00
	00		 ja	 $LN147@Railgun_Qu@13

; 8744 :     // Trident i.e. BNDM reinforced ]
; 8745 : 
; 8746 : 	if (cbPattern > cbTarget)
; 8747 : 		return(NULL);
; 8748 : 
; 8749 : 	if ( cbPattern<4) { 

  03cb0	83 fb 04	 cmp	 ebx, 4
  03cb3	0f 83 b2 00 00
	00		 jae	 $LN67@Railgun_Qu@13

; 8750 : 		pbTarget = pbTarget+cbPattern;
; 8751 : 		ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  03cb9	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03cbd	0f be 07	 movsx	 eax, BYTE PTR [edi]
  03cc0	0f be 4c 1f ff	 movsx	 ecx, BYTE PTR [edi+ebx-1]
  03cc5	c1 e0 08	 shl	 eax, 8
  03cc8	03 c8		 add	 ecx, eax

; 8752 : 
; 8753 : 		if ( cbPattern==3) {

  03cca	8b c1		 mov	 eax, ecx
  03ccc	03 f3		 add	 esi, ebx
  03cce	c1 e8 08	 shr	 eax, 8
  03cd1	83 fb 03	 cmp	 ebx, 3
  03cd4	75 5a		 jne	 SHORT $LL57@Railgun_Qu@13
  03cd6	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL65@Railgun_Qu@13:

; 8754 : 			for ( ;; ) {
; 8755 : 				if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  03ce0	0f be 56 fd	 movsx	 edx, BYTE PTR [esi-3]
  03ce4	0f be 5e ff	 movsx	 ebx, BYTE PTR [esi-1]
  03ce8	c1 e2 08	 shl	 edx, 8
  03ceb	03 d3		 add	 edx, ebx
  03ced	3b ca		 cmp	 ecx, edx
  03cef	75 0e		 jne	 SHORT $LN62@Railgun_Qu@13

; 8756 : 					if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));

  03cf1	8a 57 01	 mov	 dl, BYTE PTR [edi+1]
  03cf4	3a 56 fe	 cmp	 dl, BYTE PTR [esi-2]
  03cf7	75 06		 jne	 SHORT $LN62@Railgun_Qu@13
  03cf9	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN62@Railgun_Qu@13:

; 8757 : 				}
; 8758 : 				if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) {

  03cff	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  03d02	74 07		 je	 SHORT $LN60@Railgun_Qu@13

; 8759 : 					pbTarget++;

  03d04	46		 inc	 esi

; 8760 : 				        //if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;
; 8761 : 				        if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++; // r8Triplet

  03d05	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  03d08	74 01		 je	 SHORT $LN60@Railgun_Qu@13
  03d0a	46		 inc	 esi
$LN60@Railgun_Qu@13:

; 8762 : 				}
; 8763 : /*
; 8764 : r.1 i.e. without 8Triplet tweak:
; 8765 : [
; 8766 : Pattern: TDK
; 8767 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8768 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 0/220
; 8769 : Railgun_Quadruplet_7Trident performance: 918KB/clock
; 8770 : 
; 8771 : Pattern: the
; 8772 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8773 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 2114180/332
; 8774 : Railgun_Quadruplet_7Trident performance: 608KB/clock
; 8775 : 
; 8776 : Pattern: pun
; 8777 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8778 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 3474/234
; 8779 : Railgun_Quadruplet_7Trident performance: 863KB/clock
; 8780 : 
; 8781 : Pattern: zoo
; 8782 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8783 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 316/210
; 8784 : Railgun_Quadruplet_7Trident performance: 962KB/clock
; 8785 : 
; 8786 : Pattern: inn
; 8787 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8788 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 35383/285
; 8789 : Railgun_Quadruplet_7Trident performance: 708KB/clock
; 8790 : 
; 8791 : Pattern: hey
; 8792 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8793 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 226644/275
; 8794 : Railgun_Quadruplet_7Trident performance: 734KB/clock
; 8795 : 
; 8796 : Pattern: dot
; 8797 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8798 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 1385/253
; 8799 : Railgun_Quadruplet_7Trident performance: 798KB/clock
; 8800 : 
; 8801 : Pattern: fum
; 8802 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8803 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 697/226
; 8804 : Railgun_Quadruplet_7Trident performance: 894KB/clock
; 8805 : ]
; 8806 : 
; 8807 : r.2 i.e. with 8Triplet tweak:
; 8808 : [
; 8809 : Pattern: TDK
; 8810 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8811 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 0/210
; 8812 : Railgun_Quadruplet_7Trident performance: 962KB/clock
; 8813 : 
; 8814 : Pattern: the
; 8815 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8816 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 2114180/316
; 8817 : Railgun_Quadruplet_7Trident performance: 639KB/clock
; 8818 : 
; 8819 : Pattern: pun
; 8820 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8821 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 3474/224
; 8822 : Railgun_Quadruplet_7Trident performance: 902KB/clock
; 8823 : 
; 8824 : Pattern: zoo
; 8825 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8826 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 316/202
; 8827 : Railgun_Quadruplet_7Trident performance: 1000KB/clock
; 8828 : 
; 8829 : Pattern: inn
; 8830 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8831 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 35383/280
; 8832 : Railgun_Quadruplet_7Trident performance: 721KB/clock
; 8833 : 
; 8834 : Pattern: hey
; 8835 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8836 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 226644/263
; 8837 : Railgun_Quadruplet_7Trident performance: 768KB/clock
; 8838 : 
; 8839 : Pattern: dot
; 8840 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8841 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 1385/248
; 8842 : Railgun_Quadruplet_7Trident performance: 814KB/clock
; 8843 : 
; 8844 : Pattern: fum
; 8845 : Doing Search for Pattern(3bytes) into String(206908949bytes) as-one-line ...
; 8846 : Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: 697/220
; 8847 : Railgun_Quadruplet_7Trident performance: 918KB/clock
; 8848 : ]
; 8849 : */
; 8850 : 				pbTarget++;

  03d0b	46		 inc	 esi

; 8851 : 				if (pbTarget > pbTargetMax)

  03d0c	3b 74 24 14	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+68664]
  03d10	76 ce		 jbe	 SHORT $LL65@Railgun_Qu@13

; 9025 : 		
; 9026 : 			return(NULL);

  03d12	33 c0		 xor	 eax, eax

; 9027 : 		} //if (cbTarget<961)
; 9028 : 	} //if ( cbPattern<4)
; 9029 : }

  03d14	5f		 pop	 edi
  03d15	5e		 pop	 esi
  03d16	5b		 pop	 ebx
  03d17	8b 8c 24 28 0c
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+68652]
  03d1e	33 cc		 xor	 ecx, esp
  03d20	e8 00 00 00 00	 call	 @__security_check_cookie@4
  03d25	8b e5		 mov	 esp, ebp
  03d27	5d		 pop	 ebp
  03d28	c3		 ret	 0
  03d29	8d a4 24 00 00
	00 00		 npad	 7
$LL57@Railgun_Qu@13:

; 8852 : 					return(NULL);
; 8853 : 			}
; 8854 : 		} else {
; 8855 : 		}
; 8856 : 		for ( ;; ) {
; 8857 : 			if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  03d30	0f be 56 fe	 movsx	 edx, BYTE PTR [esi-2]
  03d34	0f be 7e ff	 movsx	 edi, BYTE PTR [esi-1]
  03d38	c1 e2 08	 shl	 edx, 8
  03d3b	03 d7		 add	 edx, edi
  03d3d	3b ca		 cmp	 ecx, edx
  03d3f	75 06		 jne	 SHORT $LN55@Railgun_Qu@13

; 8858 : 				Railgunhits++; //return((pbTarget-2));

  03d41	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN55@Railgun_Qu@13:

; 8859 : 			if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  03d47	3a 46 ff	 cmp	 al, BYTE PTR [esi-1]
  03d4a	74 01		 je	 SHORT $LN54@Railgun_Qu@13
  03d4c	46		 inc	 esi
$LN54@Railgun_Qu@13:

; 8860 : 			pbTarget++;

  03d4d	46		 inc	 esi

; 8861 : 			if (pbTarget > pbTargetMax)

  03d4e	3b 74 24 14	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+68664]
  03d52	76 dc		 jbe	 SHORT $LL57@Railgun_Qu@13

; 9025 : 		
; 9026 : 			return(NULL);

  03d54	33 c0		 xor	 eax, eax

; 9027 : 		} //if (cbTarget<961)
; 9028 : 	} //if ( cbPattern<4)
; 9029 : }

  03d56	5f		 pop	 edi
  03d57	5e		 pop	 esi
  03d58	5b		 pop	 ebx
  03d59	8b 8c 24 28 0c
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+68652]
  03d60	33 cc		 xor	 ecx, esp
  03d62	e8 00 00 00 00	 call	 @__security_check_cookie@4
  03d67	8b e5		 mov	 esp, ebp
  03d69	5d		 pop	 ebp
  03d6a	c3		 ret	 0
$LN67@Railgun_Qu@13:

; 8862 : 				return(NULL);
; 8863 : 		}
; 8864 : 	} else { //if ( cbPattern<4)
; 8865 : 		if (cbTarget<961) { // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  03d6b	81 ff c1 03 00
	00		 cmp	 edi, 961		; 000003c1H
  03d71	0f 83 f8 00 00
	00		 jae	 $LN51@Railgun_Qu@13

; 8866 : /*
; 8867 : 			// A better strstr, with no asm code
; 8868 : 			// Written by Mischa Sandberg
; 8869 : 			// http://mischasan.wordpress.com
; 8870 : 			// static char const *
; 8871 : 			// scanstrm(char const *tgt, char const *pat, int len)
; 8872 : 			// {
; 8873 : 			//     uint32_t head = MSBF32(pat), wind = 0, next;
; 8874 : 			// 
; 8875 : 			//     pat += 4, len -= 4;
; 8876 : 			//     while ((next = *(uint8_t const*)tgt++)) {
; 8877 : 			//         wind = ( wind << 8 ) + next;
; 8878 : 			//         if (wind == head && !memcmp(tgt, pat, len))
; 8879 : 			//             return tgt - 4;
; 8880 : 			//     }
; 8881 : 			//     return  NULL;
; 8882 : 			//}
; 8883 : 			ulHashPattern = 0;
; 8884 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;
; 8885 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;
; 8886 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;
; 8887 : 			ulHashPattern = ( ulHashPattern << 8 ) + *(uint8_t const*)pbPattern++;
; 8888 : 			AdvanceHopperGrass = 0;
; 8889 : 			cbPattern -= 4;
; 8890 : 			while ((ulHashTarget = *(uint8_t const*)pbTarget++)) {
; 8891 : 				AdvanceHopperGrass = ( AdvanceHopperGrass << 8 ) + ulHashTarget;
; 8892 : 				if (AdvanceHopperGrass == ulHashPattern && !memcmp(pbTarget, pbPattern, cbPattern))
; 8893 : 				Railgunhits++; //return pbTarget - 4;
; 8894 : 			}
; 8895 : 			return  NULL;
; 8896 : */
; 8897 : 			pbTarget = pbTarget+cbPattern;
; 8898 : 			ulHashPattern = *(unsigned long *)(pbPattern);

  03d77	8b 44 24 10	 mov	 eax, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03d7b	8b 08		 mov	 ecx, DWORD PTR [eax]

; 8899 : 
; 8900 : 			SINGLET = ulHashPattern & 0xFF;
; 8901 : 			Quadruplet2nd = SINGLET<<8;

  03d7d	0f b6 c1	 movzx	 eax, cl
  03d80	8b d0		 mov	 edx, eax
  03d82	c1 e2 08	 shl	 edx, 8
  03d85	89 54 24 24	 mov	 DWORD PTR _Quadruplet2nd$[esp+68664], edx

; 8902 : 			Quadruplet3rd = SINGLET<<16;

  03d89	8b d0		 mov	 edx, eax
  03d8b	03 f3		 add	 esi, ebx
  03d8d	c1 e2 10	 shl	 edx, 16			; 00000010H
  03d90	89 44 24 20	 mov	 DWORD PTR tv938[esp+68664], eax

; 8903 : 			Quadruplet4th = SINGLET<<24;

  03d94	c1 e0 18	 shl	 eax, 24			; 00000018H
  03d97	89 75 08	 mov	 DWORD PTR _pbTarget$[ebp], esi
  03d9a	89 4c 24 28	 mov	 DWORD PTR _ulHashPattern$[esp+68664], ecx
  03d9e	89 54 24 2c	 mov	 DWORD PTR _Quadruplet3rd$[esp+68664], edx
  03da2	89 44 24 1c	 mov	 DWORD PTR _Quadruplet4th$[esp+68664], eax
  03da6	eb 04		 jmp	 SHORT $LN50@Railgun_Qu@13
$LL130@Railgun_Qu@13:
  03da8	8b 4c 24 28	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+68664]
$LN50@Railgun_Qu@13:

; 8904 : 
; 8905 : 			for ( ;; ) {
; 8906 : 				AdvanceHopperGrass = 0;
; 8907 : 				ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  03dac	2b f3		 sub	 esi, ebx
  03dae	8b 06		 mov	 eax, DWORD PTR [esi]
  03db0	33 d2		 xor	 edx, edx
  03db2	89 54 24 18	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+68664], edx

; 8908 : 
; 8909 : 			        if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  03db6	3b c8		 cmp	 ecx, eax
  03db8	75 54		 jne	 SHORT $LN48@Railgun_Qu@13

; 8910 : 					count = cbPattern-1;

  03dba	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]

; 8911 : 					while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  03dbd	85 c0		 test	 eax, eax
  03dbf	74 45		 je	 SHORT $LN99@Railgun_Qu@13

; 8910 : 					count = cbPattern-1;

  03dc1	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03dc5	8b 75 08	 mov	 esi, DWORD PTR _pbTarget$[ebp]
  03dc8	2b f8		 sub	 edi, eax
  03dca	2b f0		 sub	 esi, eax
  03dcc	03 fb		 add	 edi, ebx
$LN47@Railgun_Qu@13:

; 8911 : 					while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  03dce	8a 0e		 mov	 cl, BYTE PTR [esi]
  03dd0	38 0f		 cmp	 BYTE PTR [edi], cl
  03dd2	75 2e		 jne	 SHORT $LN46@Railgun_Qu@13

; 8912 : 						if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  03dd4	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  03dd7	03 d0		 add	 edx, eax
  03dd9	3b ca		 cmp	 ecx, edx
  03ddb	75 14		 jne	 SHORT $LN126@Railgun_Qu@13
  03ddd	0f be 0e	 movsx	 ecx, BYTE PTR [esi]
  03de0	39 4c 24 20	 cmp	 DWORD PTR tv938[esp+68664], ecx
  03de4	74 0b		 je	 SHORT $LN126@Railgun_Qu@13
  03de6	8b 54 24 18	 mov	 edx, DWORD PTR _AdvanceHopperGrass$[esp+68664]
  03dea	42		 inc	 edx
  03deb	89 54 24 18	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+68664], edx
  03def	eb 04		 jmp	 SHORT $LN45@Railgun_Qu@13
$LN126@Railgun_Qu@13:
  03df1	8b 54 24 18	 mov	 edx, DWORD PTR _AdvanceHopperGrass$[esp+68664]
$LN45@Railgun_Qu@13:

; 8913 : 						count--;

  03df5	47		 inc	 edi
  03df6	46		 inc	 esi
  03df7	48		 dec	 eax
  03df8	75 d4		 jne	 SHORT $LN47@Railgun_Qu@13

; 8914 : 					}
; 8915 : 					if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  03dfa	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 8916 : 			        } else { // The goal here: to avoid memory accesses by stressing the registers.

  03e00	eb 42		 jmp	 SHORT $LN40@Railgun_Qu@13
$LN46@Railgun_Qu@13:

; 8914 : 					}
; 8915 : 					if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  03e02	85 c0		 test	 eax, eax
  03e04	75 3e		 jne	 SHORT $LN40@Railgun_Qu@13
$LN99@Railgun_Qu@13:
  03e06	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 8916 : 			        } else { // The goal here: to avoid memory accesses by stressing the registers.

  03e0c	eb 36		 jmp	 SHORT $LN40@Railgun_Qu@13
$LN48@Railgun_Qu@13:

; 8917 : 					if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  03e0e	8b c8		 mov	 ecx, eax
  03e10	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  03e16	39 4c 24 24	 cmp	 DWORD PTR _Quadruplet2nd$[esp+68664], ecx
  03e1a	74 28		 je	 SHORT $LN40@Railgun_Qu@13

; 8918 : 						AdvanceHopperGrass++;
; 8919 : 						if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  03e1c	8b c8		 mov	 ecx, eax
  03e1e	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  03e24	ba 01 00 00 00	 mov	 edx, 1
  03e29	39 4c 24 2c	 cmp	 DWORD PTR _Quadruplet3rd$[esp+68664], ecx
  03e2d	74 15		 je	 SHORT $LN40@Railgun_Qu@13

; 8920 : 							AdvanceHopperGrass++;
; 8921 : 							if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  03e2f	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  03e34	ba 02 00 00 00	 mov	 edx, 2
  03e39	39 44 24 1c	 cmp	 DWORD PTR _Quadruplet4th$[esp+68664], eax
  03e3d	74 05		 je	 SHORT $LN40@Railgun_Qu@13
  03e3f	ba 03 00 00 00	 mov	 edx, 3
$LN40@Railgun_Qu@13:

; 8922 : 						}
; 8923 : 					}
; 8924 : 				}
; 8925 : 
; 8926 : 				AdvanceHopperGrass++;
; 8927 : 
; 8928 : 				pbTarget = pbTarget + AdvanceHopperGrass;

  03e44	8b 45 08	 mov	 eax, DWORD PTR _pbTarget$[ebp]
  03e47	8d 74 10 01	 lea	 esi, DWORD PTR [eax+edx+1]
  03e4b	89 75 08	 mov	 DWORD PTR _pbTarget$[ebp], esi

; 8929 : 				if (pbTarget > pbTargetMax)

  03e4e	3b 74 24 14	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+68664]
  03e52	0f 86 50 ff ff
	ff		 jbe	 $LL130@Railgun_Qu@13

; 9025 : 		
; 9026 : 			return(NULL);

  03e58	33 c0		 xor	 eax, eax

; 9027 : 		} //if (cbTarget<961)
; 9028 : 	} //if ( cbPattern<4)
; 9029 : }

  03e5a	5f		 pop	 edi
  03e5b	5e		 pop	 esi
  03e5c	5b		 pop	 ebx
  03e5d	8b 8c 24 28 0c
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+68652]
  03e64	33 cc		 xor	 ecx, esp
  03e66	e8 00 00 00 00	 call	 @__security_check_cookie@4
  03e6b	8b e5		 mov	 esp, ebp
  03e6d	5d		 pop	 ebp
  03e6e	c3		 ret	 0
$LN51@Railgun_Qu@13:

; 8930 : 					return(NULL);
; 8931 : 			}
; 8932 : 		} else { //if (cbTarget<961)
; 8933 : 			countSTATIC = cbPattern-2-2;

  03e6f	8d 4b fc	 lea	 ecx, DWORD PTR [ebx-4]
  03e72	89 4c 24 24	 mov	 DWORD PTR _countSTATIC$[esp+68664], ecx
  03e76	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]

; 8934 : 
; 8935 : 			for (a=0; a < 256; a++) {bm_bc[a]=cbPattern; bm_bc2nd[a]=cbPattern+1;}

  03e79	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  03e7e	8d bc 24 30 04
	00 00		 lea	 edi, DWORD PTR _bm_bc2nd$[esp+68664]
  03e85	f3 ab		 rep stosd
  03e87	8b c3		 mov	 eax, ebx
  03e89	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  03e8e	8d bc 24 30 08
	00 00		 lea	 edi, DWORD PTR _bm_bc$[esp+68664]
  03e95	f3 ab		 rep stosd

; 8936 : 			for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1; 

  03e97	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  03e9a	33 c0		 xor	 eax, eax
  03e9c	85 c9		 test	 ecx, ecx
  03e9e	74 19		 je	 SHORT $LN32@Railgun_Qu@13
$LN34@Railgun_Qu@13:
  03ea0	8b 7c 24 10	 mov	 edi, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03ea4	0f be 3c 07	 movsx	 edi, BYTE PTR [edi+eax]
  03ea8	8b d3		 mov	 edx, ebx
  03eaa	2b d0		 sub	 edx, eax
  03eac	4a		 dec	 edx
  03ead	40		 inc	 eax
  03eae	89 94 bc 30 08
	00 00		 mov	 DWORD PTR _bm_bc$[esp+edi*4+68664], edx
  03eb5	3b c1		 cmp	 eax, ecx
  03eb7	72 e7		 jb	 SHORT $LN34@Railgun_Qu@13
$LN32@Railgun_Qu@13:

; 8937 : 			for (j=0; j < cbPattern; j++) bm_bc2nd[pbPattern[j]]=cbPattern-j; 

  03eb9	33 c0		 xor	 eax, eax
  03ebb	85 db		 test	 ebx, ebx
  03ebd	74 19		 je	 SHORT $LN29@Railgun_Qu@13
  03ebf	90		 npad	 1
$LL31@Railgun_Qu@13:
  03ec0	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03ec4	0f be 14 02	 movsx	 edx, BYTE PTR [edx+eax]
  03ec8	8b cb		 mov	 ecx, ebx
  03eca	2b c8		 sub	 ecx, eax
  03ecc	40		 inc	 eax
  03ecd	89 8c 94 30 04
	00 00		 mov	 DWORD PTR _bm_bc2nd$[esp+edx*4+68664], ecx
  03ed4	3b c3		 cmp	 eax, ebx
  03ed6	72 e8		 jb	 SHORT $LL31@Railgun_Qu@13
$LN29@Railgun_Qu@13:

; 8938 : 
; 8939 : 			ulHashPattern = *(unsigned long *)(pbPattern); // First four bytes

  03ed8	8b 44 24 10	 mov	 eax, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03edc	8b 08		 mov	 ecx, DWORD PTR [eax]
  03ede	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]

; 8940 : 			//ulHashTarget = *(unsigned short *)(pbPattern+cbPattern-1-1); // Last two bytes
; 8941 : 		
; 8942 : 			AdvanceHopperGrass = 0;
; 8943 : 			i=0;
; 8944 : 
; 8945 : 			// Elsiane r.2  [
; 8946 : 			for (a=0; a < 256*256; a++) {bm_Horspool_Order2[a]= cbPattern-1;} // cbPattern-(Order-1) for Horspool; 'memset' if not optimized

  03ee1	0f b6 c2	 movzx	 eax, dl
  03ee4	68 00 00 01 00	 push	 65536			; 00010000H
  03ee9	89 4c 24 2c	 mov	 DWORD PTR _ulHashPattern$[esp+68668], ecx
  03eed	50		 push	 eax
  03eee	8d 8c 24 38 0c
	00 00		 lea	 ecx, DWORD PTR _bm_Horspool_Order2$[esp+68672]
  03ef5	33 ff		 xor	 edi, edi
  03ef7	51		 push	 ecx
  03ef8	89 7c 24 24	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+68676], edi
  03efc	e8 00 00 00 00	 call	 _memset

; 8947 : 
; 8948 : 			// alfalfa 7 long 6 BBs (al lf fa al lf fa) 3 distinct BBs (al lf fa) 
; 8949 : 			// fast 4 0-1-2 fa as st
; 8950 : 			for (j=0; j < cbPattern-1; j++) bm_Horspool_Order2[*(unsigned short *)(pbPattern+j)]=j; // Rightmost appearance/position is needed

  03f01	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  03f04	83 c4 0c	 add	 esp, 12			; 0000000cH
  03f07	33 c0		 xor	 eax, eax
  03f09	85 c9		 test	 ecx, ecx
  03f0b	74 14		 je	 SHORT $LN23@Railgun_Qu@13
$LN25@Railgun_Qu@13:
  03f0d	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03f11	0f b7 14 02	 movzx	 edx, WORD PTR [edx+eax]
  03f15	88 84 14 30 0c
	00 00		 mov	 BYTE PTR _bm_Horspool_Order2$[esp+edx+68664], al
  03f1c	40		 inc	 eax
  03f1d	3b c1		 cmp	 eax, ecx
  03f1f	72 ec		 jb	 SHORT $LN25@Railgun_Qu@13
$LN23@Railgun_Qu@13:

; 8951 : 
; 8952 : 			// Elsiane r.2 ]
; 8953 : 
; 8954 : 			if ( cbPattern<=32 ) {

  03f21	83 fb 20	 cmp	 ebx, 32			; 00000020H
  03f24	77 38		 ja	 SHORT $LN81@Railgun_Qu@13

; 8955 : 				for (j = 0; j < cbPattern; ++j)

  03f26	33 c0		 xor	 eax, eax
  03f28	85 db		 test	 ebx, ebx
  03f2a	74 32		 je	 SHORT $LN81@Railgun_Qu@13
  03f2c	8d 4b ff	 lea	 ecx, DWORD PTR [ebx-1]
  03f2f	89 4c 24 14	 mov	 DWORD PTR tv1321[esp+68664], ecx
$LN21@Railgun_Qu@13:

; 8956 : 					maskv[pat[j]] |= 1 << (cbPattern - 1 - j);

  03f33	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03f37	0f b6 14 02	 movzx	 edx, BYTE PTR [edx+eax]
  03f3b	8d 54 94 30	 lea	 edx, DWORD PTR _maskv$[esp+edx*4+68664]
  03f3f	89 54 24 1c	 mov	 DWORD PTR tv974[esp+68664], edx
  03f43	ba 01 00 00 00	 mov	 edx, 1
  03f48	d3 e2		 shl	 edx, cl
  03f4a	8b 4c 24 1c	 mov	 ecx, DWORD PTR tv974[esp+68664]
  03f4e	40		 inc	 eax
  03f4f	09 11		 or	 DWORD PTR [ecx], edx
  03f51	8b 4c 24 14	 mov	 ecx, DWORD PTR tv1321[esp+68664]
  03f55	49		 dec	 ecx
  03f56	89 4c 24 14	 mov	 DWORD PTR tv1321[esp+68664], ecx
  03f5a	3b c3		 cmp	 eax, ebx
  03f5c	72 d5		 jb	 SHORT $LN21@Railgun_Qu@13
$LN81@Railgun_Qu@13:

; 8957 : 			}
; 8958 : 
; 8959 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  03f5e	8b 44 24 20	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+68664]
  03f62	2b c3		 sub	 eax, ebx
  03f64	89 44 24 1c	 mov	 DWORD PTR tv770[esp+68664], eax
  03f68	eb 06 8d 9b 00
	00 00 00	 npad	 8
$LL18@Railgun_Qu@13:

; 8960 : 				Gulliver = bm_Horspool_Order2[*(unsigned short *)&pbTarget[i+cbPattern-1-1]];

  03f70	8d 0c 1e	 lea	 ecx, DWORD PTR [esi+ebx]
  03f73	0f b7 44 39 fe	 movzx	 eax, WORD PTR [ecx+edi-2]
  03f78	0f b6 84 04 30
	0c 00 00	 movzx	 eax, BYTE PTR _bm_Horspool_Order2$[esp+eax+68664]

; 8961 : 
; 8962 : 				if ( Gulliver == cbPattern-2 ) { // CASE #1: means the pair (char order 2) is found

  03f80	8d 53 fe	 lea	 edx, DWORD PTR [ebx-2]
  03f83	3b c2		 cmp	 eax, edx
  03f85	75 60		 jne	 SHORT $LN16@Railgun_Qu@13

; 8963 : 					if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  03f87	8b 4c 24 28	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+68664]
  03f8b	39 0c 37	 cmp	 DWORD PTR [edi+esi], ecx
  03f8e	75 35		 jne	 SHORT $LN12@Railgun_Qu@13

; 8964 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  03f90	8b 44 24 24	 mov	 eax, DWORD PTR _countSTATIC$[esp+68664]

; 8965 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  03f94	85 c0		 test	 eax, eax
  03f96	74 27		 je	 SHORT $LN98@Railgun_Qu@13

; 8964 : 						count = countSTATIC; // Last two chars already matched, to be fixed with -2

  03f98	8b 54 24 10	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  03f9c	83 c2 04	 add	 edx, 4
  03f9f	89 54 24 14	 mov	 DWORD PTR tv1400[esp+68664], edx
  03fa3	8d 4c 37 04	 lea	 ecx, DWORD PTR [edi+esi+4]
$LL14@Railgun_Qu@13:

; 8965 : 						while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  03fa7	8b 54 24 14	 mov	 edx, DWORD PTR tv1400[esp+68664]
  03fab	8a 12		 mov	 dl, BYTE PTR [edx]
  03fad	3a 11		 cmp	 dl, BYTE PTR [ecx]
  03faf	75 0a		 jne	 SHORT $LN13@Railgun_Qu@13

; 8966 : 							count--;

  03fb1	ff 44 24 14	 inc	 DWORD PTR tv1400[esp+68664]
  03fb5	41		 inc	 ecx
  03fb6	48		 dec	 eax
  03fb7	75 ee		 jne	 SHORT $LL14@Railgun_Qu@13

; 8967 : 						if ( count == 0) Railgunhits++; //return(pbTarget+i);

  03fb9	eb 04		 jmp	 SHORT $LN98@Railgun_Qu@13
$LN13@Railgun_Qu@13:
  03fbb	85 c0		 test	 eax, eax
  03fbd	75 06		 jne	 SHORT $LN12@Railgun_Qu@13
$LN98@Railgun_Qu@13:
  03fbf	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN12@Railgun_Qu@13:

; 8968 : 					}
; 8969 : 					//i = i + 1; // r.1, obviuosly this is the worst skip so turning to 'SunHorse': lines below
; 8970 : 					if ( bm_bc[(unsigned char)pbTarget[i+cbPattern-1]] < bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]] )

  03fc5	8d 0c 1e	 lea	 ecx, DWORD PTR [esi+ebx]
  03fc8	0f b6 44 39 ff	 movzx	 eax, BYTE PTR [ecx+edi-1]
  03fcd	0f b6 0c 39	 movzx	 ecx, BYTE PTR [ecx+edi]
  03fd1	8b 84 84 30 08
	00 00		 mov	 eax, DWORD PTR _bm_bc$[esp+eax*4+68664]
  03fd8	8b 8c 8c 30 04
	00 00		 mov	 ecx, DWORD PTR _bm_bc2nd$[esp+ecx*4+68664]
  03fdf	3b c1		 cmp	 eax, ecx
  03fe1	73 3e		 jae	 SHORT $LN6@Railgun_Qu@13

; 8971 : 					         Gulliver =  bm_bc2nd[(unsigned char)pbTarget[i+(cbPattern)]];

  03fe3	8b c1		 mov	 eax, ecx

; 8972 : 					else

  03fe5	eb 3a		 jmp	 SHORT $LN6@Railgun_Qu@13
$LN16@Railgun_Qu@13:

; 8973 : 					         Gulliver =  bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];
; 8974 : 				} else if ( Gulliver != cbPattern-1 ) { // CASE #2: if equal means the pair (char order 2) is not found i.e. Gulliver remains intact, skip the whole pattern and fall back (Order-1) chars i.e. one char for Order 2

  03fe7	8d 53 ff	 lea	 edx, DWORD PTR [ebx-1]
  03fea	3b c2		 cmp	 eax, edx
  03fec	74 33		 je	 SHORT $LN6@Railgun_Qu@13

; 8975 : 					Gulliver = cbPattern - Gulliver - 2; // CASE #3: the pair is found and not as suffix i.e. rightmost position

  03fee	8b d3		 mov	 edx, ebx
  03ff0	2b d0		 sub	 edx, eax
  03ff2	8d 42 fe	 lea	 eax, DWORD PTR [edx-2]

; 8976 : 					if ( cbPattern<=32 ) {

  03ff5	83 fb 20	 cmp	 ebx, 32			; 00000020H
  03ff8	77 27		 ja	 SHORT $LN6@Railgun_Qu@13

; 8977 : 					// BNDM should not dig further to the left: Order 2 (presence + position) vs Order 3 (presence check only)
; 8978 : 					// Unrolling three times, should be optimized since a register houses all chars up to Order 4
; 8979 : 					mask = maskv[tgt[i + (cbPattern-0) - 1]];
; 8980 : 					mask = (mask << 1) & maskv[tgt[i + (cbPattern-1) - 1]];
; 8981 : 					mask = (mask << 1) & maskv[tgt[i + (cbPattern-2) - 1]];
; 8982 : 					//mask = (mask << 1) & maskv[tgt[i + (cbPattern-3) - 1]]; // Since Pattern is 4[+] long
; 8983 : 				        //if (mask) // Means a matching triad exists at some position thus use Order 2's offset
; 8984 : 					//else // Means a triad exists NOT i.e. skip the whole pattern and fall back (Order-1) chars i.e. two chars for Order 3
; 8985 : 				        if (!mask)

  03ffa	0f b6 54 39 ff	 movzx	 edx, BYTE PTR [ecx+edi-1]
  03fff	8b 54 94 30	 mov	 edx, DWORD PTR _maskv$[esp+edx*4+68664]
  04003	0f b6 4c 39 fe	 movzx	 ecx, BYTE PTR [ecx+edi-2]
  04008	03 d2		 add	 edx, edx
  0400a	23 54 8c 30	 and	 edx, DWORD PTR _maskv$[esp+ecx*4+68664]
  0400e	8d 0c 1e	 lea	 ecx, DWORD PTR [esi+ebx]
  04011	0f b6 4c 39 fd	 movzx	 ecx, BYTE PTR [ecx+edi-3]
  04016	03 d2		 add	 edx, edx
  04018	85 54 8c 30	 test	 edx, DWORD PTR _maskv$[esp+ecx*4+68664]
  0401c	75 03		 jne	 SHORT $LN6@Railgun_Qu@13

; 8986 : 						Gulliver = cbPattern-2;

  0401e	8d 43 fe	 lea	 eax, DWORD PTR [ebx-2]
$LN6@Railgun_Qu@13:

; 8957 : 			}
; 8958 : 
; 8959 : 			while (i <= cbTarget-cbPattern-1) { // -1 because Sunday is used

  04021	8b 4c 24 1c	 mov	 ecx, DWORD PTR tv770[esp+68664]

; 8987 : 					}
; 8988 : 				}
; 8989 : 				i = i + Gulliver;
; 8990 : 
; 8991 : // 32323218 Order 1 Horspool Skip-table A
; 8992 : // 01234568 Order 1 Horspool Skip-table B
; 8993 : // fa af fa af fa as st Order 2 Horspool Skip-table B
; 8994 : //  0  1  2  3  4  5  6
; 8995 : // HIKARIfast
; 8996 : // fafafast
; 8997 : //   fafafast +2 Order 1 'a' vs 't'
; 8998 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-5-1 = 2) Order 1 'a' vs 't'
; 8999 : //   fafafast +2 = (cbPattern-SkipB-Order = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3
; 9000 : 
; 9001 : // 76543218 Order 1 Horspool
; 9002 : // lo on ng gp pa ac ce Order 2 Horspool
; 9003 : //  0  1  2  3  4  5  6
; 9004 : // HIKARIfast
; 9005 : // longpace
; 9006 : //   longpace +2 Order 1 'a' vs 'e'
; 9007 : //        longpace +7 = (cbPattern-(Order-1) = 8-(2-1) = 7) Order 2 'fa' vs 'ce' i.e. CASE #2
; 9008 : 
; 9009 : 				AdvanceHopperGrass++;

  04025	ff 44 24 18	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+68664]
  04029	03 f8		 add	 edi, eax
  0402b	8d 41 ff	 lea	 eax, DWORD PTR [ecx-1]
  0402e	3b f8		 cmp	 edi, eax
  04030	0f 86 3a ff ff
	ff		 jbe	 $LL18@Railgun_Qu@13

; 9010 : 			}
; 9011 : 
; 9012 : 			if (i == cbTarget-cbPattern) {

  04036	3b f9		 cmp	 edi, ecx
  04038	75 37		 jne	 SHORT $LN5@Railgun_Qu@13

; 9013 : 				if ( *(unsigned long *)&pbTarget[i] == ulHashPattern) {

  0403a	8b 54 24 28	 mov	 edx, DWORD PTR _ulHashPattern$[esp+68664]
  0403e	39 14 37	 cmp	 DWORD PTR [edi+esi], edx
  04041	75 2a		 jne	 SHORT $LN1@Railgun_Qu@13

; 9014 : 					count = countSTATIC;

  04043	8b 44 24 24	 mov	 eax, DWORD PTR _countSTATIC$[esp+68664]

; 9015 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  04047	85 c0		 test	 eax, eax
  04049	74 1c		 je	 SHORT $LN97@Railgun_Qu@13

; 9014 : 					count = countSTATIC;

  0404b	8b 4c 24 10	 mov	 ecx, DWORD PTR _pbPattern$GSCopy$[esp+68664]
  0404f	83 c1 04	 add	 ecx, 4
  04052	8d 74 37 04	 lea	 esi, DWORD PTR [edi+esi+4]
$LL3@Railgun_Qu@13:

; 9015 : 					while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) )

  04056	8a 11		 mov	 dl, BYTE PTR [ecx]
  04058	3a 16		 cmp	 dl, BYTE PTR [esi]
  0405a	75 07		 jne	 SHORT $LN2@Railgun_Qu@13

; 9016 : 						count--;

  0405c	46		 inc	 esi
  0405d	41		 inc	 ecx
  0405e	48		 dec	 eax
  0405f	75 f5		 jne	 SHORT $LL3@Railgun_Qu@13

; 9017 : 					if ( count == 0) Railgunhits++; //return(pbTarget+i);

  04061	eb 04		 jmp	 SHORT $LN97@Railgun_Qu@13
$LN2@Railgun_Qu@13:
  04063	85 c0		 test	 eax, eax
  04065	75 06		 jne	 SHORT $LN1@Railgun_Qu@13
$LN97@Railgun_Qu@13:
  04067	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN1@Railgun_Qu@13:

; 9018 : 				}
; 9019 : 				AdvanceHopperGrass++;

  0406d	ff 44 24 18	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+68664]
$LN5@Railgun_Qu@13:

; 9020 : 			}
; 9021 : 
; 9022 : 			GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  04071	8b 44 24 20	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+68664]
  04075	db 44 24 20	 fild	 DWORD PTR _cbTarget$GSCopy$[esp+68664]
  04079	85 c0		 test	 eax, eax
  0407b	79 06		 jns	 SHORT $LN145@Railgun_Qu@13
  0407d	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN145@Railgun_Qu@13:
  04083	8b 74 24 18	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+68664]
  04087	8b ce		 mov	 ecx, esi
  04089	89 4c 24 1c	 mov	 DWORD PTR tv1486[esp+68664], ecx
  0408d	db 44 24 1c	 fild	 DWORD PTR tv1486[esp+68664]
  04091	85 c9		 test	 ecx, ecx
  04093	79 06		 jns	 SHORT $LN146@Railgun_Qu@13
  04095	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN146@Railgun_Qu@13:
  0409b	de f9		 fdivp	 ST(1), ST(0)
  0409d	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  040a3	e8 00 00 00 00	 call	 __ftol2_sse
  040a8	8b c8		 mov	 ecx, eax
  040aa	99		 cdq
  040ab	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 9023 : 			GlobalI += AdvanceHopperGrass;
; 9024 : 			printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);

  040b1	56		 push	 esi
  040b2	51		 push	 ecx
  040b3	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  040b9	01 35 00 00 00
	00		 add	 DWORD PTR _GlobalI, esi
  040bf	68 00 00 00 00	 push	 OFFSET $SG7309
  040c4	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  040cb	e8 00 00 00 00	 call	 _printf
  040d0	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN147@Railgun_Qu@13:

; 9027 : 		} //if (cbTarget<961)
; 9028 : 	} //if ( cbPattern<4)
; 9029 : }

  040d3	8b 8c 24 34 0c
	01 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+68664]
  040da	5f		 pop	 edi
  040db	5e		 pop	 esi
  040dc	5b		 pop	 ebx
  040dd	33 cc		 xor	 ecx, esp
  040df	33 c0		 xor	 eax, eax
  040e1	e8 00 00 00 00	 call	 @__security_check_cookie@4
  040e6	8b e5		 mov	 esp, ebp
  040e8	5d		 pop	 ebp
  040e9	c3		 ret	 0
_Railgun_Quadruplet_7Trident_count_hits ENDP
_TEXT	ENDS
PUBLIC	__$ArrayPad$
PUBLIC	_BNDM_32
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
$T10598 = -1032						; size = 4
_maskv$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_BNDM_32 PROC

; 9069 : {

  040f0	81 ec 08 04 00
	00		 sub	 esp, 1032		; 00000408H
  040f6	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  040fb	33 c4		 xor	 eax, esp
  040fd	89 84 24 04 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1032], eax
  04104	53		 push	 ebx
  04105	8b 9c 24 14 04
	00 00		 mov	 ebx, DWORD PTR _pbPattern$[esp+1032]
  0410c	56		 push	 esi
  0410d	57		 push	 edi

; 9070 :     uint8_t    *tgt = (uint8_t*)pbTarget, *pat = (uint8_t*)pbPattern;
; 9071 :     int        i, j;
; 9072 :     uint32_t   mask, maskv[256] = {0};

  0410e	68 fc 03 00 00	 push	 1020			; 000003fcH
  04113	8d 44 24 18	 lea	 eax, DWORD PTR _maskv$[esp+1052]
  04117	6a 00		 push	 0
  04119	50		 push	 eax
  0411a	c7 44 24 1c 00
	00 00 00	 mov	 DWORD PTR _maskv$[esp+1056], 0
  04122	e8 00 00 00 00	 call	 _memset

; 9073 :  
; 9074 :     if (cbPattern > cbTarget)

  04127	8b b4 24 30 04
	00 00		 mov	 esi, DWORD PTR _cbPattern$[esp+1052]
  0412e	8b bc 24 2c 04
	00 00		 mov	 edi, DWORD PTR _cbTarget$[esp+1052]
  04135	83 c4 0c	 add	 esp, 12			; 0000000cH

; 9075 :         return(NULL);

  04138	33 c0		 xor	 eax, eax
  0413a	3b f7		 cmp	 esi, edi
  0413c	77 72		 ja	 SHORT $LN10@BNDM_32

; 9076 : 
; 9077 :     for (i = 0; i < cbPattern; ++i)

  0413e	55		 push	 ebp
  0413f	85 f6		 test	 esi, esi
  04141	74 24		 je	 SHORT $LN6@BNDM_32
  04143	8d 4e ff	 lea	 ecx, DWORD PTR [esi-1]
  04146	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL8@BNDM_32:

; 9078 :         maskv[pat[i]] |= 1 << (cbPattern - 1 - i);

  04150	0f b6 14 03	 movzx	 edx, BYTE PTR [ebx+eax]
  04154	bd 01 00 00 00	 mov	 ebp, 1
  04159	d3 e5		 shl	 ebp, cl
  0415b	8d 54 94 14	 lea	 edx, DWORD PTR _maskv$[esp+edx*4+1048]
  0415f	40		 inc	 eax
  04160	49		 dec	 ecx
  04161	09 2a		 or	 DWORD PTR [edx], ebp
  04163	3b c6		 cmp	 eax, esi
  04165	72 e9		 jb	 SHORT $LL8@BNDM_32
$LN6@BNDM_32:

; 9079 :  
; 9080 :     i=0;
; 9081 :     while (i <= cbTarget-cbPattern) {

  04167	8b 9c 24 1c 04
	00 00		 mov	 ebx, DWORD PTR _pbTarget$[esp+1044]
  0416e	33 c9		 xor	 ecx, ecx
  04170	2b fe		 sub	 edi, esi
  04172	89 7c 24 10	 mov	 DWORD PTR $T10598[esp+1048], edi
  04176	8d 6c 33 ff	 lea	 ebp, DWORD PTR [ebx+esi-1]
  0417a	8d 9b 00 00 00
	00		 npad	 6
$LL5@BNDM_32:

; 9082 :           mask = maskv[tgt[cbPattern - 1 + i]];

  04180	0f b6 14 29	 movzx	 edx, BYTE PTR [ecx+ebp]
  04184	8b 44 94 14	 mov	 eax, DWORD PTR _maskv$[esp+edx*4+1048]

; 9083 :           j = cbPattern;

  04188	8b d6		 mov	 edx, esi

; 9084 :           while (mask) {

  0418a	85 c0		 test	 eax, eax
  0418c	74 17		 je	 SHORT $LN2@BNDM_32
  0418e	8b ff		 npad	 2
$LL3@BNDM_32:

; 9085 :                 if (!--j) return pbTarget + i;

  04190	4a		 dec	 edx
  04191	74 35		 je	 SHORT $LN15@BNDM_32

; 9086 :                 mask = (mask << 1) & maskv[tgt[i + j - 1]];

  04193	8d 3c 0a	 lea	 edi, DWORD PTR [edx+ecx]
  04196	0f b6 7c 1f ff	 movzx	 edi, BYTE PTR [edi+ebx-1]
  0419b	8b 7c bc 14	 mov	 edi, DWORD PTR _maskv$[esp+edi*4+1048]
  0419f	03 c0		 add	 eax, eax
  041a1	23 c7		 and	 eax, edi
  041a3	75 eb		 jne	 SHORT $LL3@BNDM_32
$LN2@BNDM_32:

; 9087 :           }
; 9088 :           i= i + j;

  041a5	03 ca		 add	 ecx, edx
  041a7	3b 4c 24 10	 cmp	 ecx, DWORD PTR $T10598[esp+1048]
  041ab	76 d3		 jbe	 SHORT $LL5@BNDM_32

; 9089 :     }
; 9090 : //    for (i = 0; i <= cbTarget - cbPattern; i += j) {
; 9091 : //        mask = maskv[tgt[cbPattern - 1 + i]];
; 9092 : //        for (j = cbPattern; mask;) {
; 9093 : //            if (!--j) return pbTarget + i;
; 9094 : //            mask = (mask << 1) & maskv[tgt[i + j - 1]];
; 9095 : //        }
; 9096 : //    }
; 9097 :     return NULL;

  041ad	33 c0		 xor	 eax, eax
$LN19@BNDM_32:
  041af	5d		 pop	 ebp
$LN10@BNDM_32:

; 9098 : }

  041b0	8b 8c 24 10 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1044]
  041b7	5f		 pop	 edi
  041b8	5e		 pop	 esi
  041b9	5b		 pop	 ebx
  041ba	33 cc		 xor	 ecx, esp
  041bc	e8 00 00 00 00	 call	 @__security_check_cookie@4
  041c1	81 c4 08 04 00
	00		 add	 esp, 1032		; 00000408H
  041c7	c3		 ret	 0
$LN15@BNDM_32:

; 9085 :                 if (!--j) return pbTarget + i;

  041c8	8d 04 19	 lea	 eax, DWORD PTR [ecx+ebx]
  041cb	eb e2		 jmp	 SHORT $LN19@BNDM_32
_BNDM_32 ENDP
_TEXT	ENDS
PUBLIC	__$ArrayPad$
PUBLIC	_BNDM_32_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
tv437 = -1032						; size = 4
tv434 = -1032						; size = 4
_AdvanceHopperGrass$ = -1032				; size = 4
_maskv$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_BNDM_32_count_hits PROC

; 9102 : {

  041d0	81 ec 08 04 00
	00		 sub	 esp, 1032		; 00000408H
  041d6	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  041db	33 c4		 xor	 eax, esp
  041dd	89 84 24 04 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1032], eax
  041e4	53		 push	 ebx
  041e5	55		 push	 ebp
  041e6	56		 push	 esi
  041e7	57		 push	 edi
  041e8	8b bc 24 20 04
	00 00		 mov	 edi, DWORD PTR _pbPattern$[esp+1044]

; 9103 :     uint8_t    *tgt = (uint8_t*)pbTarget, *pat = (uint8_t*)pbPattern;
; 9104 :     int        i, j;
; 9105 :     uint32_t   mask, maskv[256] = {0};

  041ef	33 ed		 xor	 ebp, ebp
  041f1	68 fc 03 00 00	 push	 1020			; 000003fcH
  041f6	8d 44 24 1c	 lea	 eax, DWORD PTR _maskv$[esp+1056]
  041fa	55		 push	 ebp
  041fb	50		 push	 eax
  041fc	89 6c 24 20	 mov	 DWORD PTR _maskv$[esp+1060], ebp
  04200	e8 00 00 00 00	 call	 _memset

; 9106 : 
; 9107 :     unsigned long AdvanceHopperGrass = 0;
; 9108 : 
; 9109 :     if (cbPattern > cbTarget)

  04205	8b b4 24 34 04
	00 00		 mov	 esi, DWORD PTR _cbPattern$[esp+1056]
  0420c	8b 9c 24 30 04
	00 00		 mov	 ebx, DWORD PTR _cbTarget$[esp+1056]
  04213	83 c4 0c	 add	 esp, 12			; 0000000cH

; 9110 :         return(NULL);

  04216	33 c0		 xor	 eax, eax
  04218	89 6c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1048], ebp
  0421c	3b f3		 cmp	 esi, ebx
  0421e	0f 87 d5 00 00
	00		 ja	 $LN11@BNDM_32_co

; 9111 :  
; 9112 :     for (i = 0; i < cbPattern; ++i) {

  04224	3b f5		 cmp	 esi, ebp
  04226	76 1f		 jbe	 SHORT $LN7@BNDM_32_co
  04228	8d 4e ff	 lea	 ecx, DWORD PTR [esi-1]
  0422b	eb 03 8d 49 00	 npad	 5
$LL9@BNDM_32_co:

; 9113 :         maskv[pat[i]] |= 1 << (cbPattern - 1 - i);

  04230	0f b6 14 07	 movzx	 edx, BYTE PTR [edi+eax]
  04234	bd 01 00 00 00	 mov	 ebp, 1
  04239	d3 e5		 shl	 ebp, cl
  0423b	8d 54 94 14	 lea	 edx, DWORD PTR _maskv$[esp+edx*4+1048]
  0423f	40		 inc	 eax
  04240	49		 dec	 ecx
  04241	09 2a		 or	 DWORD PTR [edx], ebp
  04243	3b c6		 cmp	 eax, esi
  04245	72 e9		 jb	 SHORT $LL9@BNDM_32_co
$LN7@BNDM_32_co:

; 9114 : //printf("i=%lu, %c, %lu\n", i, pat[i], maskv[pat[i]]);
; 9115 : 
; 9116 : //printf("%s ", _ui64toaKAZEzerocomma(i, llTOaDigits2, 10)+(60-2) ); 
; 9117 : //printf("%c ",  pat[i]); 
; 9118 : //printf("%s\n", _ui64toaKAZEzerocomma(maskv[pat[i]], llTOaDigits2, 2)+(60-39) ); 
; 9119 : /*
; 9120 : Pattern: alfalfa
; 9121 : Doing Search for Pattern(7bytes) into String(206908949bytes) as-one-line ...
; 9122 : 
; 9123 :                                     alf,alfa
; 9124 : 00 a 0000,0000,0000,0000,0000,0000,0100,0000
; 9125 : 01 l 0000,0000,0000,0000,0000,0000,0010,0000
; 9126 : 02 f 0000,0000,0000,0000,0000,0000,0001,0000
; 9127 : 03 a 0000,0000,0000,0000,0000,0000,0100,1000
; 9128 : 04 l 0000,0000,0000,0000,0000,0000,0010,0100
; 9129 : 05 f 0000,0000,0000,0000,0000,0000,0001,0010
; 9130 : 06 a 0000,0000,0000,0000,0000,0000,0100,1001
; 9131 : 
; 9132 : BNDM_32:                         1870KB/clock / 0691%, 29,938392 iterations
; 9133 : Railgun_Quadruplet_7sun:         1642KB/clock / 0748%, 27,654192 iterations
; 9134 : Railgun_Quadruplet_7:            1642KB/clock / 0662%, 31,226521 iterations
; 9135 : Railgun_Quadruplet_7sunhorse:    1202KB/clock / 0786%, 26,295205 iterations
; 9136 : Railgun_Quadruplet_7Elsiane:     1063KB/clock / 0871%, 23,744531 iterations
; 9137 : Railgun_Quadruplet_7Gulliver:    1496KB/clock / 0598%, 34,583650 iterations
; 9138 : Railgun_Quadruplet_7Hasherezade: 1507KB/clock / 0598%, 34,583650 iterations
; 9139 : 
; 9140 : Pattern: underrated
; 9141 : Doing Search for Pattern(10bytes) into String(206908949bytes) as-one-line ...
; 9142 : 
; 9143 :                                 un,derr,ated
; 9144 : 00 u 0000,0000,0000,0000,0000,0010,0000,0000
; 9145 : 01 n 0000,0000,0000,0000,0000,0001,0000,0000
; 9146 : 02 d 0000,0000,0000,0000,0000,0000,1000,0000
; 9147 : 03 e 0000,0000,0000,0000,0000,0000,0100,0000
; 9148 : 04 r 0000,0000,0000,0000,0000,0000,0010,0000
; 9149 : 05 r 0000,0000,0000,0000,0000,0000,0011,0000
; 9150 : 06 a 0000,0000,0000,0000,0000,0000,0000,1000
; 9151 : 07 t 0000,0000,0000,0000,0000,0000,0000,0100
; 9152 : 08 e 0000,0000,0000,0000,0000,0000,0100,0010
; 9153 : 09 d 0000,0000,0000,0000,0000,0000,1000,0001
; 9154 : 
; 9155 : BNDM_32:                         1287KB/clock / 0965%, 21,438744 iterations
; 9156 : Railgun_Quadruplet_7sun:         1942KB/clock / 0894%, 23,127481 iterations
; 9157 : Railgun_Quadruplet_7:            1942KB/clock / 0804%, 25,703793 iterations
; 9158 : Railgun_Quadruplet_7sunhorse:    1141KB/clock / 1025%, 20,167543 iterations
; 9159 : Railgun_Quadruplet_7Elsiane:     0768KB/clock / 1072%, 19,285870 iterations
; 9160 : Railgun_Quadruplet_7Gulliver:    1906KB/clock / 0885%, 23,374120 iterations
; 9161 : Railgun_Quadruplet_7Hasherezade: 1870KB/clock / 0885%, 23,374120 iterations
; 9162 : 
; 9163 : Pattern: bye-bye-bye-bye-bye-
; 9164 : Doing Search for Pattern(20bytes) into String(206908949bytes) as-one-line ...
; 9165 : 
; 9166 :                     bye-,bye-,bye-,bye-,bye-
; 9167 : 00 b 0000,0000,0000,1000,0000,0000,0000,0000
; 9168 : 01 y 0000,0000,0000,0100,0000,0000,0000,0000
; 9169 : 02 e 0000,0000,0000,0010,0000,0000,0000,0000
; 9170 : 03 - 0000,0000,0000,0001,0000,0000,0000,0000
; 9171 : 04 b 0000,0000,0000,1000,1000,0000,0000,0000
; 9172 : 05 y 0000,0000,0000,0100,0100,0000,0000,0000
; 9173 : 06 e 0000,0000,0000,0010,0010,0000,0000,0000
; 9174 : 07 - 0000,0000,0000,0001,0001,0000,0000,0000
; 9175 : 08 b 0000,0000,0000,1000,1000,1000,0000,0000
; 9176 : 09 y 0000,0000,0000,0100,0100,0100,0000,0000
; 9177 : 10 e 0000,0000,0000,0010,0010,0010,0000,0000
; 9178 : 11 - 0000,0000,0000,0001,0001,0001,0000,0000
; 9179 : 12 b 0000,0000,0000,1000,1000,1000,1000,0000
; 9180 : 13 y 0000,0000,0000,0100,0100,0100,0100,0000
; 9181 : 14 e 0000,0000,0000,0010,0010,0010,0010,0000
; 9182 : 15 - 0000,0000,0000,0001,0001,0001,0001,0000
; 9183 : 16 b 0000,0000,0000,1000,1000,1000,1000,1000
; 9184 : 17 y 0000,0000,0000,0100,0100,0100,0100,0100
; 9185 : 18 e 0000,0000,0000,0010,0010,0010,0010,0010
; 9186 : 19 - 0000,0000,0000,0001,0001,0001,0001,0001
; 9187 : 
; 9188 : BNDM_32:                         3483KB/clock / 1988%, 10,402957 iterations
; 9189 : Railgun_Quadruplet_7sun:         3207KB/clock / 1891%, 10,940613 iterations
; 9190 : Railgun_Quadruplet_7:            3259KB/clock / 1806%, 11,450773 iterations
; 9191 : Railgun_Quadruplet_7sunhorse:    2557KB/clock / 2069%, 09,995656 iterations
; 9192 : Railgun_Quadruplet_7Elsiane:     2104KB/clock / 2149%, 09,627265 iterations
; 9193 : Railgun_Quadruplet_7Gulliver:    3259KB/clock / 1898%, 10,898305 iterations
; 9194 : Railgun_Quadruplet_7Hasherezade: 3157KB/clock / 1899%, 10,892762 iterations
; 9195 : 
; 9196 : Pattern: fastest fox with biggest strides
; 9197 : Doing Search for Pattern(32bytes) into String(206908949bytes) as-one-line ...
; 9198 : 
; 9199 :      fast,est ,fox ,with, big,gest, str,ides
; 9200 : 00 f 1000,0000,0000,0000,0000,0000,0000,0000
; 9201 : 01 a 0100,0000,0000,0000,0000,0000,0000,0000
; 9202 : 02 s 0010,0000,0000,0000,0000,0000,0000,0000
; 9203 : 03 t 0001,0000,0000,0000,0000,0000,0000,0000
; 9204 : 04 e 0000,1000,0000,0000,0000,0000,0000,0000
; 9205 : 05 s 0010,0100,0000,0000,0000,0000,0000,0000
; 9206 : 06 t 0001,0010,0000,0000,0000,0000,0000,0000
; 9207 : 07   0000,0001,0000,0000,0000,0000,0000,0000
; 9208 : 08 f 1000,0000,1000,0000,0000,0000,0000,0000
; 9209 : 09 o 0000,0000,0100,0000,0000,0000,0000,0000
; 9210 : 10 x 0000,0000,0010,0000,0000,0000,0000,0000
; 9211 : 11   0000,0001,0001,0000,0000,0000,0000,0000
; 9212 : 12 w 0000,0000,0000,1000,0000,0000,0000,0000
; 9213 : 13 i 0000,0000,0000,0100,0000,0000,0000,0000
; 9214 : 14 t 0001,0010,0000,0010,0000,0000,0000,0000
; 9215 : 15 h 0000,0000,0000,0001,0000,0000,0000,0000
; 9216 : 16   0000,0001,0001,0000,1000,0000,0000,0000
; 9217 : 17 b 0000,0000,0000,0000,0100,0000,0000,0000
; 9218 : 18 i 0000,0000,0000,0100,0010,0000,0000,0000
; 9219 : 19 g 0000,0000,0000,0000,0001,0000,0000,0000
; 9220 : 20 g 0000,0000,0000,0000,0001,1000,0000,0000
; 9221 : 21 e 0000,1000,0000,0000,0000,0100,0000,0000
; 9222 : 22 s 0010,0100,0000,0000,0000,0010,0000,0000
; 9223 : 23 t 0001,0010,0000,0010,0000,0001,0000,0000
; 9224 : 24   0000,0001,0001,0000,1000,0000,1000,0000
; 9225 : 25 s 0010,0100,0000,0000,0000,0010,0100,0000
; 9226 : 26 t 0001,0010,0000,0010,0000,0001,0010,0000
; 9227 : 27 r 0000,0000,0000,0000,0000,0000,0001,0000
; 9228 : 28 i 0000,0000,0000,0100,0010,0000,0000,1000
; 9229 : 29 d 0000,0000,0000,0000,0000,0000,0000,0100
; 9230 : 30 e 0000,1000,0000,0000,0000,0100,0000,0010
; 9231 : 31 s 0010,0100,0000,0000,0000,0010,0100,0001
; 9232 : 
; 9233 : BNDM_32:                         2886KB/clock / 3113%, 06,644708 iterations
; 9234 : Railgun_Quadruplet_7sun:         2694KB/clock / 1584%, 13,060463 iterations
; 9235 : Railgun_Quadruplet_7:            2767KB/clock / 1511%, 13,689243 iterations
; 9236 : Railgun_Quadruplet_7sunhorse:    1820KB/clock / 2138%, 09,677267 iterations
; 9237 : Railgun_Quadruplet_7Elsiane:     1566KB/clock / 2143%, 09,652548 iterations
; 9238 : Railgun_Quadruplet_7Gulliver:    3108KB/clock / 2924%, 07,074287 iterations
; 9239 : Railgun_Quadruplet_7Hasherezade: 2971KB/clock / 3041%, 06,801754 iterations
; 9240 : 
; 9241 : */
; 9242 : 
; 9243 : }
; 9244 : 
; 9245 : 
; 9246 : 
; 9247 :     i=0;
; 9248 :     while (i <= cbTarget-cbPattern) {

  04247	8b bc 24 1c 04
	00 00		 mov	 edi, DWORD PTR _pbTarget$[esp+1044]
  0424e	33 d2		 xor	 edx, edx
  04250	2b de		 sub	 ebx, esi
$LL6@BNDM_32_co:

; 9249 :           mask = maskv[tgt[cbPattern - 1 + i]];

  04252	8d 44 37 ff	 lea	 eax, DWORD PTR [edi+esi-1]
  04256	0f b6 0c 10	 movzx	 ecx, BYTE PTR [eax+edx]
  0425a	8b 4c 8c 14	 mov	 ecx, DWORD PTR _maskv$[esp+ecx*4+1048]

; 9250 :           j = cbPattern;

  0425e	8b c6		 mov	 eax, esi

; 9251 :           while (mask) {

  04260	85 c9		 test	 ecx, ecx
  04262	74 20		 je	 SHORT $LN20@BNDM_32_co
$LL4@BNDM_32_co:

; 9252 :                 if (j==1) {Railgunhits++; mask = 0;} //return pbTarget + i;

  04264	83 f8 01	 cmp	 eax, 1
  04267	74 15		 je	 SHORT $LN19@BNDM_32_co

; 9253 :                 else {j--; mask = (mask << 1) & maskv[tgt[i + j - 1]];}

  04269	48		 dec	 eax
  0426a	8d 2c 10	 lea	 ebp, DWORD PTR [eax+edx]
  0426d	0f b6 6c 2f ff	 movzx	 ebp, BYTE PTR [edi+ebp-1]
  04272	8b 6c ac 14	 mov	 ebp, DWORD PTR _maskv$[esp+ebp*4+1048]
  04276	03 c9		 add	 ecx, ecx
  04278	23 cd		 and	 ecx, ebp
  0427a	75 e8		 jne	 SHORT $LL4@BNDM_32_co

; 9251 :           while (mask) {

  0427c	eb 06		 jmp	 SHORT $LN20@BNDM_32_co
$LN19@BNDM_32_co:

; 9252 :                 if (j==1) {Railgunhits++; mask = 0;} //return pbTarget + i;

  0427e	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN20@BNDM_32_co:

; 9254 :           }
; 9255 :           i= i + j;
; 9256 :  
; 9257 : //    for (i = 0; i <= cbTarget - cbPattern; i += j) {
; 9258 : //        mask = maskv[tgt[cbPattern - 1 + i]];
; 9259 : //        for (j = cbPattern; mask;) {
; 9260 : //            if (!--j) {Railgunhits++; j++; mask = 0;} //return pbTarget + i;
; 9261 : //            else mask = (mask << 1) & maskv[tgt[i + j - 1]];
; 9262 : //        }
; 9263 :     AdvanceHopperGrass++;

  04284	8b 6c 24 10	 mov	 ebp, DWORD PTR _AdvanceHopperGrass$[esp+1048]
  04288	03 d0		 add	 edx, eax
  0428a	45		 inc	 ebp
  0428b	89 6c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1048], ebp
  0428f	3b d3		 cmp	 edx, ebx
  04291	76 bf		 jbe	 SHORT $LL6@BNDM_32_co

; 9264 :     }
; 9265 : 
; 9266 :     GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  04293	8b 94 24 24 04
	00 00		 mov	 edx, DWORD PTR _cbTarget$[esp+1044]
  0429a	db 84 24 24 04
	00 00		 fild	 DWORD PTR _cbTarget$[esp+1044]
  042a1	85 d2		 test	 edx, edx
  042a3	79 06		 jns	 SHORT $LN22@BNDM_32_co
  042a5	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN22@BNDM_32_co:
  042ab	8b c5		 mov	 eax, ebp
  042ad	89 44 24 10	 mov	 DWORD PTR tv434[esp+1048], eax
  042b1	db 44 24 10	 fild	 DWORD PTR tv434[esp+1048]
  042b5	85 c0		 test	 eax, eax
  042b7	79 06		 jns	 SHORT $LN23@BNDM_32_co
  042b9	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN23@BNDM_32_co:
  042bf	de f9		 fdivp	 ST(1), ST(0)
  042c1	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  042c7	e8 00 00 00 00	 call	 __ftol2_sse
  042cc	8b c8		 mov	 ecx, eax
  042ce	99		 cdq
  042cf	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 9267 :     GlobalI += AdvanceHopperGrass;
; 9268 :     printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);

  042d5	55		 push	 ebp
  042d6	51		 push	 ecx
  042d7	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  042dd	01 2d 00 00 00
	00		 add	 DWORD PTR _GlobalI, ebp
  042e3	68 00 00 00 00	 push	 OFFSET $SG7378
  042e8	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  042ef	e8 00 00 00 00	 call	 _printf
  042f4	83 c4 0c	 add	 esp, 12			; 0000000cH

; 9269 : 
; 9270 :     return NULL;

  042f7	33 c0		 xor	 eax, eax
$LN11@BNDM_32_co:

; 9271 : }

  042f9	8b 8c 24 14 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1048]
  04300	5f		 pop	 edi
  04301	5e		 pop	 esi
  04302	5d		 pop	 ebp
  04303	5b		 pop	 ebx
  04304	33 cc		 xor	 ecx, esp
  04306	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0430b	81 c4 08 04 00
	00		 add	 esp, 1032		; 00000408H
  04311	c3		 ret	 0
_BNDM_32_count_hits ENDP
_TEXT	ENDS
PUBLIC	_cbTarget$GSCopy$
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7_count_hits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_cbTarget$GSCopy$ = -1060				; size = 4
_AdvanceHopperGrass$ = -1060				; size = 4
tv852 = -1056						; size = 4
tv850 = -1056						; size = 4
_countSTATIC$ = -1056					; size = 4
_pbTargetMax$ = -1056					; size = 4
_ulHashPattern$ = -1052					; size = 4
tv605 = -1048						; size = 4
_Quadruplet3rd$ = -1048					; size = 4
tv576 = -1044						; size = 4
$T10636 = -1044						; size = 4
_pbPattern$GSCopy$ = -1040				; size = 4
_Quadruplet2nd$ = -1036					; size = 4
_Quadruplet4th$ = -1032					; size = 4
_bm_bc$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7_count_hits PROC

; 9281 : {

  04320	81 ec 24 04 00
	00		 sub	 esp, 1060		; 00000424H
  04326	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  0432b	33 c4		 xor	 eax, esp
  0432d	89 84 24 20 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1060], eax
  04334	8b 84 24 30 04
	00 00		 mov	 eax, DWORD PTR _cbTarget$[esp+1056]
  0433b	53		 push	 ebx
  0433c	8b 9c 24 30 04
	00 00		 mov	 ebx, DWORD PTR _pbPattern$[esp+1060]
  04343	55		 push	 ebp

; 9282 :     char * pbTargetMax = pbTarget + cbTarget;

  04344	8b ac 24 30 04
	00 00		 mov	 ebp, DWORD PTR _pbTarget$[esp+1064]
  0434b	56		 push	 esi

; 9283 : register unsigned long ulHashPattern;
; 9284 :     unsigned long ulHashTarget;
; 9285 :     //unsigned long count; //r.6+
; 9286 :     signed long count;
; 9287 :     //unsigned long countSTATIC; //r.6+
; 9288 :     signed long countSTATIC;
; 9289 : //  unsigned long countRemainder;
; 9290 : 
; 9291 : /*
; 9292 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 9293 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 9294 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 9295 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 9296 : */
; 9297 :     unsigned char SINGLET;
; 9298 :     unsigned long Quadruplet2nd;
; 9299 :     unsigned long Quadruplet3rd;
; 9300 :     unsigned long Quadruplet4th;
; 9301 : 
; 9302 :     unsigned long  AdvanceHopperGrass;
; 9303 : 
; 9304 :     long i; //BMH needed
; 9305 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 9306 :     unsigned char ch; //BMH needed
; 9307 :     unsigned long chchchch; //BMH needed
; 9308 :     unsigned short chchchchSHORT; //BMH needed
; 9309 :     //unsigned char * chPTR;
; 9310 :     unsigned char firstch; //BMH needed
; 9311 : //    unsigned char lastch, firstch; //BMH needed
; 9312 : 
; 9313 :     if (cbPattern > cbTarget)

  0434c	8b b4 24 40 04
	00 00		 mov	 esi, DWORD PTR _cbPattern$[esp+1068]
  04353	57		 push	 edi
  04354	8d 3c 28	 lea	 edi, DWORD PTR [eax+ebp]
  04357	89 5c 24 24	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1076], ebx

; 9477 :     }
; 9478 : 
; 9479 : GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  0435b	89 44 24 10	 mov	 DWORD PTR _cbTarget$GSCopy$[esp+1076], eax
  0435f	89 7c 24 14	 mov	 DWORD PTR _pbTargetMax$[esp+1076], edi
  04363	3b f0		 cmp	 esi, eax
  04365	0f 87 5d 02 00
	00		 ja	 $LN95@Railgun_Qu@14

; 9314 :         return(NULL);
; 9315 : 
; 9316 : // Doesn't work when cbPattern = 1
; 9317 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 9318 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  0436b	83 fe 04	 cmp	 esi, 4
  0436e	73 7d		 jae	 SHORT $LN41@Railgun_Qu@14

; 9319 :         pbTarget = pbTarget+cbPattern;
; 9320 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  04370	0f be 0b	 movsx	 ecx, BYTE PTR [ebx]
  04373	0f be 44 33 ff	 movsx	 eax, BYTE PTR [ebx+esi-1]
  04378	c1 e1 08	 shl	 ecx, 8
  0437b	03 c1		 add	 eax, ecx

; 9321 : //        countSTATIC = cbPattern-2;
; 9322 : 
; 9323 : if ( cbPattern==3) {

  0437d	8b c8		 mov	 ecx, eax
  0437f	03 ee		 add	 ebp, esi
  04381	c1 e9 08	 shr	 ecx, 8
  04384	83 fe 03	 cmp	 esi, 3
  04387	75 36		 jne	 SHORT $LN77@Railgun_Qu@14
  04389	8d a4 24 00 00
	00 00		 npad	 7
$LL39@Railgun_Qu@14:

; 9324 :     for ( ;; )
; 9325 :     {
; 9326 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  04390	0f be 55 fd	 movsx	 edx, BYTE PTR [ebp-3]
  04394	0f be 75 ff	 movsx	 esi, BYTE PTR [ebp-1]
  04398	c1 e2 08	 shl	 edx, 8
  0439b	03 d6		 add	 edx, esi
  0439d	3b c2		 cmp	 eax, edx
  0439f	75 0e		 jne	 SHORT $LN90@Railgun_Qu@14

; 9327 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) Railgunhits++; //return((pbTarget-3));

  043a1	8a 53 01	 mov	 dl, BYTE PTR [ebx+1]
  043a4	3a 55 fe	 cmp	 dl, BYTE PTR [ebp-2]
  043a7	75 06		 jne	 SHORT $LN90@Railgun_Qu@14
  043a9	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN90@Railgun_Qu@14:

; 9328 :         }
; 9329 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  043af	3a 4d fe	 cmp	 cl, BYTE PTR [ebp-2]
  043b2	74 01		 je	 SHORT $LN91@Railgun_Qu@14
  043b4	45		 inc	 ebp
$LN91@Railgun_Qu@14:

; 9330 :         pbTarget++;

  043b5	45		 inc	 ebp

; 9331 :         if (pbTarget > pbTargetMax)

  043b6	3b ef		 cmp	 ebp, edi
  043b8	76 d6		 jbe	 SHORT $LL39@Railgun_Qu@14

; 9332 :             return(NULL);

  043ba	e9 09 02 00 00	 jmp	 $LN95@Railgun_Qu@14
$LN77@Railgun_Qu@14:
  043bf	ba 01 00 00 00	 mov	 edx, 1
$LL32@Railgun_Qu@14:

; 9333 :     }
; 9334 : } else {
; 9335 : }
; 9336 :     for ( ;; )
; 9337 :     {
; 9338 :         // The line below gives for 'cbPattern'>=1:
; 9339 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 9340 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 9341 : /*
; 9342 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 9343 :             return((long)(pbTarget-cbPattern));
; 9344 : */
; 9345 : 
; 9346 :         // The fragment below gives for 'cbPattern'>=2:
; 9347 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 9348 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 9349 : 
; 9350 : /*
; 9351 : //For 2 and 3 [
; 9352 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 9353 : //         count = countSTATIC;
; 9354 :          count = cbPattern-2;
; 9355 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 9356 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 9357 :                count--;
; 9358 :          }
; 9359 :          if ( count == 0) return((pbTarget-cbPattern));
; 9360 :         }
; 9361 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 9362 : //For 2 and 3 ]
; 9363 : */
; 9364 : 
; 9365 : 
; 9366 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  043c4	0f be 75 fe	 movsx	 esi, BYTE PTR [ebp-2]
  043c8	0f be 5d ff	 movsx	 ebx, BYTE PTR [ebp-1]
  043cc	c1 e6 08	 shl	 esi, 8
  043cf	03 f3		 add	 esi, ebx
  043d1	3b c6		 cmp	 eax, esi
  043d3	75 06		 jne	 SHORT $LN30@Railgun_Qu@14

; 9367 :             Railgunhits++; //return((pbTarget-2));

  043d5	01 15 00 00 00
	00		 add	 DWORD PTR _Railgunhits, edx
$LN30@Railgun_Qu@14:

; 9368 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  043db	3a 4d ff	 cmp	 cl, BYTE PTR [ebp-1]
  043de	74 02		 je	 SHORT $LN29@Railgun_Qu@14
  043e0	03 ea		 add	 ebp, edx
$LN29@Railgun_Qu@14:

; 9369 : 
; 9370 : 
; 9371 :         // The fragment below gives for 'cbPattern'>=2:
; 9372 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 9373 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 9374 : /*
; 9375 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 9376 :          count = countSTATIC>>2;
; 9377 :          countRemainder = countSTATIC % 4;
; 9378 : 
; 9379 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 9380 :                count--;
; 9381 :          }
; 9382 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 9383 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 9384 :                countRemainder--;
; 9385 :          }
; 9386 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 9387 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 9388 :          //}
; 9389 :         }
; 9390 : */
; 9391 : 
; 9392 :         pbTarget++;

  043e2	03 ea		 add	 ebp, edx

; 9393 :         if (pbTarget > pbTargetMax)

  043e4	3b ef		 cmp	 ebp, edi
  043e6	76 dc		 jbe	 SHORT $LL32@Railgun_Qu@14

; 9394 :             return(NULL);

  043e8	e9 db 01 00 00	 jmp	 $LN95@Railgun_Qu@14
$LN41@Railgun_Qu@14:

; 9395 :     }
; 9396 : } else { //if ( cbPattern<4)
; 9397 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  043ed	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H
  043f2	0f 83 df 00 00
	00		 jae	 $LN26@Railgun_Qu@14

; 9398 : {
; 9399 :         pbTarget = pbTarget+cbPattern;
; 9400 :         ulHashPattern = *(unsigned long *)(pbPattern);

  043f8	8b 13		 mov	 edx, DWORD PTR [ebx]

; 9401 : //        countSTATIC = cbPattern-1;
; 9402 : 
; 9403 :     //SINGLET = *(char *)(pbPattern);
; 9404 :     SINGLET = ulHashPattern & 0xFF;
; 9405 :     Quadruplet2nd = SINGLET<<8;

  043fa	0f b6 c2	 movzx	 eax, dl
  043fd	8b f8		 mov	 edi, eax

; 9406 :     Quadruplet3rd = SINGLET<<16;

  043ff	8b c8		 mov	 ecx, eax
  04401	c1 e7 08	 shl	 edi, 8
  04404	c1 e1 10	 shl	 ecx, 16			; 00000010H
  04407	03 ee		 add	 ebp, esi
  04409	89 44 24 20	 mov	 DWORD PTR tv576[esp+1076], eax

; 9407 :     Quadruplet4th = SINGLET<<24;

  0440d	c1 e0 18	 shl	 eax, 24			; 00000018H
  04410	89 54 24 18	 mov	 DWORD PTR _ulHashPattern$[esp+1076], edx
  04414	89 7c 24 28	 mov	 DWORD PTR _Quadruplet2nd$[esp+1076], edi
  04418	89 4c 24 1c	 mov	 DWORD PTR _Quadruplet3rd$[esp+1076], ecx
  0441c	89 44 24 2c	 mov	 DWORD PTR _Quadruplet4th$[esp+1076], eax
  04420	eb 0c		 jmp	 SHORT $LN25@Railgun_Qu@14
$LL89@Railgun_Qu@14:
  04422	8b 44 24 2c	 mov	 eax, DWORD PTR _Quadruplet4th$[esp+1076]
  04426	8b 54 24 18	 mov	 edx, DWORD PTR _ulHashPattern$[esp+1076]
  0442a	8b 7c 24 28	 mov	 edi, DWORD PTR _Quadruplet2nd$[esp+1076]
$LN25@Railgun_Qu@14:

; 9408 : 
; 9409 :     for ( ;; )
; 9410 :     {
; 9411 : 	AdvanceHopperGrass = 0;
; 9412 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  0442e	8b cd		 mov	 ecx, ebp
  04430	2b ce		 sub	 ecx, esi
  04432	8b 09		 mov	 ecx, DWORD PTR [ecx]
  04434	33 db		 xor	 ebx, ebx
  04436	89 5c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1076], ebx

; 9413 : 
; 9414 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  0443a	3b d1		 cmp	 edx, ecx
  0443c	75 53		 jne	 SHORT $LN23@Railgun_Qu@14

; 9415 : //         count = countSTATIC;
; 9416 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 9417 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 9418 : //               count--;
; 9419 : //         }
; 9420 :          count = cbPattern-1;

  0443e	8d 4e ff	 lea	 ecx, DWORD PTR [esi-1]

; 9421 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  04441	85 c9		 test	 ecx, ecx
  04443	74 44		 je	 SHORT $LN69@Railgun_Qu@14

; 9415 : //         count = countSTATIC;
; 9416 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 9417 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 9418 : //               count--;
; 9419 : //         }
; 9420 :          count = cbPattern-1;

  04445	8b 54 24 24	 mov	 edx, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  04449	8b fd		 mov	 edi, ebp
  0444b	2b d1		 sub	 edx, ecx
  0444d	2b f9		 sub	 edi, ecx
  0444f	03 d6		 add	 edx, esi
$LL22@Railgun_Qu@14:

; 9421 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  04451	8a 07		 mov	 al, BYTE PTR [edi]
  04453	38 02		 cmp	 BYTE PTR [edx], al
  04455	75 2e		 jne	 SHORT $LN21@Railgun_Qu@14

; 9422 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  04457	8d 46 ff	 lea	 eax, DWORD PTR [esi-1]
  0445a	03 d9		 add	 ebx, ecx
  0445c	3b c3		 cmp	 eax, ebx
  0445e	75 14		 jne	 SHORT $LN85@Railgun_Qu@14
  04460	0f be 07	 movsx	 eax, BYTE PTR [edi]
  04463	39 44 24 20	 cmp	 DWORD PTR tv576[esp+1076], eax
  04467	74 0b		 je	 SHORT $LN85@Railgun_Qu@14
  04469	8b 5c 24 10	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+1076]
  0446d	43		 inc	 ebx
  0446e	89 5c 24 10	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1076], ebx
  04472	eb 04		 jmp	 SHORT $LN20@Railgun_Qu@14
$LN85@Railgun_Qu@14:
  04474	8b 5c 24 10	 mov	 ebx, DWORD PTR _AdvanceHopperGrass$[esp+1076]
$LN20@Railgun_Qu@14:

; 9423 :                count--;

  04478	42		 inc	 edx
  04479	47		 inc	 edi
  0447a	49		 dec	 ecx
  0447b	75 d4		 jne	 SHORT $LL22@Railgun_Qu@14

; 9424 :          }
; 9425 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  0447d	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 9426 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  04483	eb 3f		 jmp	 SHORT $LN88@Railgun_Qu@14
$LN21@Railgun_Qu@14:

; 9424 :          }
; 9425 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  04485	85 c9		 test	 ecx, ecx
  04487	75 3b		 jne	 SHORT $LN88@Railgun_Qu@14
$LN69@Railgun_Qu@14:
  04489	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 9426 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  0448f	eb 33		 jmp	 SHORT $LN88@Railgun_Qu@14
$LN23@Railgun_Qu@14:

; 9427 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  04491	8b d1		 mov	 edx, ecx
  04493	81 e2 00 ff 00
	00		 and	 edx, 65280		; 0000ff00H
  04499	3b fa		 cmp	 edi, edx
  0449b	74 27		 je	 SHORT $LN88@Railgun_Qu@14

; 9428 :          AdvanceHopperGrass++;
; 9429 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  0449d	8b d1		 mov	 edx, ecx
  0449f	81 e2 00 00 ff
	00		 and	 edx, 16711680		; 00ff0000H
  044a5	bb 01 00 00 00	 mov	 ebx, 1
  044aa	39 54 24 1c	 cmp	 DWORD PTR _Quadruplet3rd$[esp+1076], edx
  044ae	74 14		 je	 SHORT $LN88@Railgun_Qu@14

; 9430 :               AdvanceHopperGrass++;
; 9431 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  044b0	81 e1 00 00 00
	ff		 and	 ecx, -16777216		; ff000000H
  044b6	bb 02 00 00 00	 mov	 ebx, 2
  044bb	3b c1		 cmp	 eax, ecx
  044bd	74 05		 je	 SHORT $LN88@Railgun_Qu@14
  044bf	bb 03 00 00 00	 mov	 ebx, 3
$LN88@Railgun_Qu@14:

; 9432 :          }
; 9433 :     }
; 9434 : 	}
; 9435 : 
; 9436 : 	AdvanceHopperGrass++;
; 9437 : 
; 9438 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  044c4	8d 6c 2b 01	 lea	 ebp, DWORD PTR [ebx+ebp+1]

; 9439 :         if (pbTarget > pbTargetMax)

  044c8	3b 6c 24 14	 cmp	 ebp, DWORD PTR _pbTargetMax$[esp+1076]
  044cc	0f 86 50 ff ff
	ff		 jbe	 $LL89@Railgun_Qu@14

; 9440 :             return(NULL);

  044d2	e9 f1 00 00 00	 jmp	 $LN95@Railgun_Qu@14
$LN26@Railgun_Qu@14:

; 9441 :     }
; 9442 : } else { //if (cbTarget<961)
; 9443 :         //countSTATIC = cbPattern-2; //r.6+
; 9444 :         //countSTATIC = cbPattern-2-3;
; 9445 :         //countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!
; 9446 :         //countSTATIC = cbPattern-2-3; // r.7- At last no recompared bytes in-between chars
; 9447 :         countSTATIC = cbPattern-2-2; // r.7 
; 9448 :         ulHashPattern = *(unsigned long *)(pbPattern);

  044d7	8b 0b		 mov	 ecx, DWORD PTR [ebx]
  044d9	8d 46 fc	 lea	 eax, DWORD PTR [esi-4]
  044dc	89 4c 24 18	 mov	 DWORD PTR _ulHashPattern$[esp+1076], ecx
  044e0	89 44 24 14	 mov	 DWORD PTR _countSTATIC$[esp+1076], eax

; 9449 : 
; 9450 :         //chPTR=(unsigned char *)&chchchch+3;
; 9451 : // Next line fixes the BUG from r.6++: but with awful speed degradation! So the bug is fixed in the definitions by setting 'countSTATIC = cbPattern-2-2;', bug appears only for patterns with lengths of 4, The setback is one unnecessary comparison for 5bytes patterns, stupidly such setback exists (from before) for 4bytes as well.
; 9452 : //if (countSTATIC<0) countSTATIC=0;
; 9453 :     /* Preprocessing */
; 9454 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  044e4	8b c6		 mov	 eax, esi
  044e6	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  044eb	8d 7c 24 30	 lea	 edi, DWORD PTR _bm_bc$[esp+1076]
  044ef	f3 ab		 rep stosd

; 9455 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  044f1	8d 4e ff	 lea	 ecx, DWORD PTR [esi-1]
  044f4	33 c0		 xor	 eax, eax
  044f6	85 c9		 test	 ecx, ecx
  044f8	74 14		 je	 SHORT $LN7@Railgun_Qu@14
  044fa	8d 56 ff	 lea	 edx, DWORD PTR [esi-1]
  044fd	8d 49 00	 npad	 3
$LL9@Railgun_Qu@14:
  04500	0f be 3c 03	 movsx	 edi, BYTE PTR [ebx+eax]
  04504	89 54 bc 30	 mov	 DWORD PTR _bm_bc$[esp+edi*4+1076], edx
  04508	40		 inc	 eax
  04509	4a		 dec	 edx
  0450a	3b c1		 cmp	 eax, ecx
  0450c	72 f2		 jb	 SHORT $LL9@Railgun_Qu@14
$LN7@Railgun_Qu@14:

; 9456 : 
; 9457 :     /* Searching */
; 9458 :     //lastch=pbPattern[cbPattern-1];
; 9459 :     //firstch=pbPattern[0];
; 9460 : 
; 9461 :     AdvanceHopperGrass = 0;
; 9462 :     i=0;
; 9463 :     while (i <= cbTarget-cbPattern) {

  0450e	8b 4c 24 10	 mov	 ecx, DWORD PTR _cbTarget$GSCopy$[esp+1076]
  04512	33 db		 xor	 ebx, ebx
  04514	33 c0		 xor	 eax, eax
  04516	2b ce		 sub	 ecx, esi
  04518	8d 54 2e ff	 lea	 edx, DWORD PTR [esi+ebp-1]
  0451c	89 4c 24 20	 mov	 DWORD PTR $T10636[esp+1076], ecx
  04520	89 54 24 1c	 mov	 DWORD PTR tv605[esp+1076], edx
$LL6@Railgun_Qu@14:

; 9464 :        //ch=pbTarget[i+cbPattern-1];
; 9465 :        //ch=pbTarget[i];
; 9466 :           //if ( pbTarget[i] == pbPattern[0] && *(unsigned long *)&pbTarget[i+cbPattern-1-3] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 9467 :           if ( *(unsigned long *)&pbTarget[i] == ulHashPattern ) // The lesson I learned from r.7- now applied in r.7: instead of extracting 'ch' having higher address now the lower address is extracted first in order (hopefully, the test confirms it) the next 32bytes (including 'ch') to be cached i.e. to comparison part is faster.

  04524	8b 4c 24 18	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+1076]
  04528	39 0c 28	 cmp	 DWORD PTR [eax+ebp], ecx
  0452b	75 2a		 jne	 SHORT $LN86@Railgun_Qu@14

; 9468 :              {
; 9469 :          count = countSTATIC;

  0452d	8b 4c 24 14	 mov	 ecx, DWORD PTR _countSTATIC$[esp+1076]

; 9470 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  04531	85 c9		 test	 ecx, ecx
  04533	74 1c		 je	 SHORT $LN68@Railgun_Qu@14

; 9468 :              {
; 9469 :          count = countSTATIC;

  04535	8b 74 24 24	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1076]
  04539	83 c6 04	 add	 esi, 4
  0453c	8d 7c 28 04	 lea	 edi, DWORD PTR [eax+ebp+4]
$LL3@Railgun_Qu@14:

; 9470 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  04540	8a 16		 mov	 dl, BYTE PTR [esi]
  04542	3a 17		 cmp	 dl, BYTE PTR [edi]
  04544	75 07		 jne	 SHORT $LN2@Railgun_Qu@14

; 9471 :                count--;

  04546	47		 inc	 edi
  04547	46		 inc	 esi
  04548	49		 dec	 ecx
  04549	75 f5		 jne	 SHORT $LL3@Railgun_Qu@14

; 9472 :          }
; 9473 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  0454b	eb 04		 jmp	 SHORT $LN68@Railgun_Qu@14
$LN2@Railgun_Qu@14:
  0454d	85 c9		 test	 ecx, ecx
  0454f	75 06		 jne	 SHORT $LN86@Railgun_Qu@14
$LN68@Railgun_Qu@14:
  04551	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN86@Railgun_Qu@14:

; 9474 : 	     }
; 9475 :        i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];

  04557	8b 4c 24 1c	 mov	 ecx, DWORD PTR tv605[esp+1076]
  0455b	0f b6 14 01	 movzx	 edx, BYTE PTR [ecx+eax]
  0455f	03 44 94 30	 add	 eax, DWORD PTR _bm_bc$[esp+edx*4+1076]

; 9476 : AdvanceHopperGrass++;

  04563	43		 inc	 ebx
  04564	3b 44 24 20	 cmp	 eax, DWORD PTR $T10636[esp+1076]
  04568	76 ba		 jbe	 SHORT $LL6@Railgun_Qu@14

; 9477 :     }
; 9478 : 
; 9479 : GlobalSP += (int)((double)cbTarget/AdvanceHopperGrass*100);

  0456a	8b 44 24 10	 mov	 eax, DWORD PTR _cbTarget$GSCopy$[esp+1076]
  0456e	db 44 24 10	 fild	 DWORD PTR _cbTarget$GSCopy$[esp+1076]
  04572	85 c0		 test	 eax, eax
  04574	79 06		 jns	 SHORT $LN93@Railgun_Qu@14
  04576	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN93@Railgun_Qu@14:
  0457c	8b cb		 mov	 ecx, ebx
  0457e	89 4c 24 14	 mov	 DWORD PTR tv850[esp+1076], ecx
  04582	db 44 24 14	 fild	 DWORD PTR tv850[esp+1076]
  04586	85 c9		 test	 ecx, ecx
  04588	79 06		 jns	 SHORT $LN94@Railgun_Qu@14
  0458a	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN94@Railgun_Qu@14:
  04590	de f9		 fdivp	 ST(1), ST(0)
  04592	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  04598	e8 00 00 00 00	 call	 __ftol2_sse
  0459d	8b c8		 mov	 ecx, eax
  0459f	99		 cdq
  045a0	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 9480 : GlobalI += AdvanceHopperGrass;
; 9481 : printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)cbTarget/AdvanceHopperGrass*100), AdvanceHopperGrass);

  045a6	53		 push	 ebx
  045a7	51		 push	 ecx
  045a8	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  045ae	01 1d 00 00 00
	00		 add	 DWORD PTR _GlobalI, ebx
  045b4	68 00 00 00 00	 push	 OFFSET $SG7481
  045b9	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  045c0	e8 00 00 00 00	 call	 _printf
  045c5	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN95@Railgun_Qu@14:

; 9482 : 
; 9483 :     return(NULL);
; 9484 : } //if (cbTarget<961)
; 9485 : } //if ( cbPattern<4)
; 9486 : }

  045c8	8b 8c 24 30 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1076]
  045cf	5f		 pop	 edi
  045d0	5e		 pop	 esi
  045d1	5d		 pop	 ebp
  045d2	5b		 pop	 ebx
  045d3	33 cc		 xor	 ecx, esp
  045d5	33 c0		 xor	 eax, eax
  045d7	e8 00 00 00 00	 call	 @__security_check_cookie@4
  045dc	81 c4 24 04 00
	00		 add	 esp, 1060		; 00000424H
  045e2	c3		 ret	 0
_Railgun_Quadruplet_7_count_hits ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_Quadruplet_7
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
tv660 = -1061						; size = 1
_ulHashPattern$ = -1060					; size = 4
_AdvanceHopperGrass$ = -1056				; size = 4
$T10696 = -1052						; size = 4
_Quadruplet2nd$ = -1052					; size = 4
_pbPattern$GSCopy$ = -1048				; size = 4
tv531 = -1044						; size = 4
_pbTargetMax$ = -1040					; size = 4
_Quadruplet3rd$ = -1036					; size = 4
_Quadruplet4th$ = -1032					; size = 4
_bm_bc$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_Quadruplet_7 PROC

; 9499 : {

  045f0	81 ec 28 04 00
	00		 sub	 esp, 1064		; 00000428H
  045f6	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  045fb	33 c4		 xor	 eax, esp
  045fd	89 84 24 24 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1064], eax

; 9500 :     char * pbTargetMax = pbTarget + cbTarget;

  04604	8b 84 24 34 04
	00 00		 mov	 eax, DWORD PTR _cbTarget$[esp+1060]

; 9501 :     register unsigned long  ulHashPattern;
; 9502 :     unsigned long ulHashTarget;
; 9503 :     //unsigned long count; //r.6+
; 9504 :     signed long count;
; 9505 :     //unsigned long countSTATIC; //r.6+
; 9506 :     signed long countSTATIC;
; 9507 : //  unsigned long countRemainder;
; 9508 : 
; 9509 : /*
; 9510 :     const unsigned char SINGLET = *(char *)(pbPattern);
; 9511 :     const unsigned long Quadruplet2nd = SINGLET<<8;
; 9512 :     const unsigned long Quadruplet3rd = SINGLET<<16;
; 9513 :     const unsigned long Quadruplet4th = SINGLET<<24;
; 9514 : */
; 9515 :     unsigned char SINGLET;
; 9516 :     unsigned long Quadruplet2nd;
; 9517 :     unsigned long Quadruplet3rd;
; 9518 :     unsigned long Quadruplet4th;
; 9519 : 
; 9520 :     unsigned long  AdvanceHopperGrass;
; 9521 : 
; 9522 :     long i; //BMH needed
; 9523 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 9524 :     unsigned char ch; //BMH needed
; 9525 :     unsigned long chchchch; //BMH needed
; 9526 : //    unsigned char lastch, firstch; //BMH needed
; 9527 : 
; 9528 :     if (cbPattern > cbTarget)

  0460b	8b 94 24 38 04
	00 00		 mov	 edx, DWORD PTR _cbPattern$[esp+1060]
  04612	53		 push	 ebx
  04613	8b 9c 24 34 04
	00 00		 mov	 ebx, DWORD PTR _pbPattern$[esp+1064]
  0461a	56		 push	 esi
  0461b	8b b4 24 34 04
	00 00		 mov	 esi, DWORD PTR _pbTarget$[esp+1068]
  04622	57		 push	 edi
  04623	8d 3c 06	 lea	 edi, DWORD PTR [esi+eax]
  04626	89 5c 24 1c	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1076], ebx
  0462a	89 7c 24 24	 mov	 DWORD PTR _pbTargetMax$[esp+1076], edi
  0462e	3b d0		 cmp	 edx, eax
  04630	76 1a		 jbe	 SHORT $LN42@Railgun_Qu@15

; 9529 :         return(NULL);

  04632	5f		 pop	 edi
  04633	5e		 pop	 esi
  04634	33 c0		 xor	 eax, eax
  04636	5b		 pop	 ebx

; 9691 : } //if (cbTarget<961)
; 9692 : } //if ( cbPattern<4)
; 9693 : }

  04637	8b 8c 24 24 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1064]
  0463e	33 cc		 xor	 ecx, esp
  04640	e8 00 00 00 00	 call	 @__security_check_cookie@4
  04645	81 c4 28 04 00
	00		 add	 esp, 1064		; 00000428H
  0464b	c3		 ret	 0
$LN42@Railgun_Qu@15:
  0464c	55		 push	 ebp

; 9530 : 
; 9531 : // Doesn't work when cbPattern = 1
; 9532 : // The next IF-fragment works very well with cbPattern>1, OBVIOUSLY IT MUST BE UNROLLED(but crippled with less functionality) SINCE either cbPattern=2 or cbPattern=3!
; 9533 : if ( cbPattern<4) { // This IF makes me unhappy: it slows down from 390KB/clock to 367KB/clock for 'fast' pattern. This fragment(for 2..3 pattern lengths) is needed because I need a function different than strchr but sticking to strstr i.e. lengths above 1 are to be handled.

  0464d	83 fa 04	 cmp	 edx, 4
  04650	0f 83 9d 00 00
	00		 jae	 $LN41@Railgun_Qu@15

; 9534 :         pbTarget = pbTarget+cbPattern;
; 9535 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  04656	0f be 03	 movsx	 eax, BYTE PTR [ebx]
  04659	0f be 4c 13 ff	 movsx	 ecx, BYTE PTR [ebx+edx-1]
  0465e	c1 e0 08	 shl	 eax, 8
  04661	03 f2		 add	 esi, edx
  04663	03 c8		 add	 ecx, eax

; 9536 : //        countSTATIC = cbPattern-2;
; 9537 : 
; 9538 : if ( cbPattern==3) {

  04665	83 fa 03	 cmp	 edx, 3
  04668	75 4f		 jne	 SHORT $LN46@Railgun_Qu@15
  0466a	8d 9b 00 00 00
	00		 npad	 6
$LL39@Railgun_Qu@15:

; 9539 :     for ( ;; )
; 9540 :     {
; 9541 :         if ( ulHashPattern == ( (*(char *)(pbTarget-3))<<8 ) + *(pbTarget-1) ) {

  04670	0f be 56 fd	 movsx	 edx, BYTE PTR [esi-3]
  04674	0f be 46 ff	 movsx	 eax, BYTE PTR [esi-1]
  04678	c1 e2 08	 shl	 edx, 8
  0467b	03 d0		 add	 edx, eax
  0467d	3b ca		 cmp	 ecx, edx
  0467f	75 08		 jne	 SHORT $LN36@Railgun_Qu@15

; 9542 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  04681	8a 53 01	 mov	 dl, BYTE PTR [ebx+1]
  04684	3a 56 fe	 cmp	 dl, BYTE PTR [esi-2]
  04687	74 2b		 je	 SHORT $LN53@Railgun_Qu@15
$LN36@Railgun_Qu@15:

; 9543 :         }
; 9544 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-2) ) pbTarget++;

  04689	8b c1		 mov	 eax, ecx
  0468b	c1 e8 08	 shr	 eax, 8
  0468e	3a 46 fe	 cmp	 al, BYTE PTR [esi-2]
  04691	74 01		 je	 SHORT $LN35@Railgun_Qu@15
  04693	46		 inc	 esi
$LN35@Railgun_Qu@15:

; 9545 :         pbTarget++;

  04694	46		 inc	 esi

; 9546 :         if (pbTarget > pbTargetMax)

  04695	3b f7		 cmp	 esi, edi
  04697	76 d7		 jbe	 SHORT $LL39@Railgun_Qu@15
$LN5@Railgun_Qu@15:

; 9689 :     }
; 9690 :     return(NULL);

  04699	33 c0		 xor	 eax, eax
$LN73@Railgun_Qu@15:

; 9691 : } //if (cbTarget<961)
; 9692 : } //if ( cbPattern<4)
; 9693 : }

  0469b	8b 8c 24 34 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1080]
  046a2	5d		 pop	 ebp
  046a3	5f		 pop	 edi
  046a4	5e		 pop	 esi
  046a5	5b		 pop	 ebx
  046a6	33 cc		 xor	 ecx, esp
  046a8	e8 00 00 00 00	 call	 @__security_check_cookie@4
  046ad	81 c4 28 04 00
	00		 add	 esp, 1064		; 00000428H
  046b3	c3		 ret	 0
$LN53@Railgun_Qu@15:

; 9542 :          if ( *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) return((pbTarget-3));

  046b4	8d 46 fd	 lea	 eax, DWORD PTR [esi-3]

; 9547 :             return(NULL);

  046b7	eb e2		 jmp	 SHORT $LN73@Railgun_Qu@15
$LN46@Railgun_Qu@15:

; 9548 :     }
; 9549 : } else {
; 9550 : }
; 9551 :     for ( ;; )
; 9552 :     {
; 9553 :         // The line below gives for 'cbPattern'>=1:
; 9554 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 9555 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 9556 : /*
; 9557 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 9558 :             return((long)(pbTarget-cbPattern));
; 9559 : */
; 9560 : 
; 9561 :         // The fragment below gives for 'cbPattern'>=2:
; 9562 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 9563 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 9564 : 
; 9565 : /*
; 9566 : //For 2 and 3 [
; 9567 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 9568 : //         count = countSTATIC;
; 9569 :          count = cbPattern-2;
; 9570 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 9571 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 9572 :                count--;
; 9573 :          }
; 9574 :          if ( count == 0) return((pbTarget-cbPattern));
; 9575 :         }
; 9576 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 9577 : //For 2 and 3 ]
; 9578 : */
; 9579 : 
; 9580 : 
; 9581 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  046b9	8a 46 ff	 mov	 al, BYTE PTR [esi-1]
  046bc	0f be 56 fe	 movsx	 edx, BYTE PTR [esi-2]
  046c0	0f be d8	 movsx	 ebx, al
  046c3	c1 e2 08	 shl	 edx, 8
  046c6	03 d3		 add	 edx, ebx
  046c8	3b ca		 cmp	 ecx, edx
  046ca	74 22		 je	 SHORT $LN55@Railgun_Qu@15
  046cc	8b d1		 mov	 edx, ecx
  046ce	c1 ea 08	 shr	 edx, 8
$LL32@Railgun_Qu@15:

; 9583 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-1) ) pbTarget++;

  046d1	3a d0		 cmp	 dl, al
  046d3	74 01		 je	 SHORT $LN72@Railgun_Qu@15
  046d5	46		 inc	 esi
$LN72@Railgun_Qu@15:

; 9584 : 
; 9585 : 
; 9586 :         // The fragment below gives for 'cbPattern'>=2:
; 9587 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 9588 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 9589 : /*
; 9590 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 9591 :          count = countSTATIC>>2;
; 9592 :          countRemainder = countSTATIC % 4;
; 9593 : 
; 9594 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 9595 :                count--;
; 9596 :          }
; 9597 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 9598 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 9599 :                countRemainder--;
; 9600 :          }
; 9601 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 9602 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 9603 :          //}
; 9604 :         }
; 9605 : */
; 9606 : 
; 9607 :         pbTarget++;

  046d6	46		 inc	 esi

; 9608 :         if (pbTarget > pbTargetMax)

  046d7	3b f7		 cmp	 esi, edi
  046d9	77 be		 ja	 SHORT $LN5@Railgun_Qu@15

; 9548 :     }
; 9549 : } else {
; 9550 : }
; 9551 :     for ( ;; )
; 9552 :     {
; 9553 :         // The line below gives for 'cbPattern'>=1:
; 9554 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 9555 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 9556 : /*
; 9557 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 9558 :             return((long)(pbTarget-cbPattern));
; 9559 : */
; 9560 : 
; 9561 :         // The fragment below gives for 'cbPattern'>=2:
; 9562 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 9563 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 9564 : 
; 9565 : /*
; 9566 : //For 2 and 3 [
; 9567 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 9568 : //         count = countSTATIC;
; 9569 :          count = cbPattern-2;
; 9570 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 9571 :          while ( count && *(char *)(pbPattern+1) == *(char *)(pbTarget-2) ) { // Crippling i.e. only 2 and 3 chars are allowed!
; 9572 :                count--;
; 9573 :          }
; 9574 :          if ( count == 0) return((pbTarget-cbPattern));
; 9575 :         }
; 9576 :         if ( (char)(ulHashPattern>>8) != *(pbTarget-cbPattern+1) ) pbTarget++;
; 9577 : //For 2 and 3 ]
; 9578 : */
; 9579 : 
; 9580 : 
; 9581 :         if ( ulHashPattern == ( (*(char *)(pbTarget-2))<<8 ) + *(pbTarget-1) )

  046db	8a 46 ff	 mov	 al, BYTE PTR [esi-1]
  046de	0f be 5e fe	 movsx	 ebx, BYTE PTR [esi-2]
  046e2	0f be e8	 movsx	 ebp, al
  046e5	c1 e3 08	 shl	 ebx, 8
  046e8	03 dd		 add	 ebx, ebp
  046ea	3b cb		 cmp	 ecx, ebx
  046ec	75 e3		 jne	 SHORT $LL32@Railgun_Qu@15
$LN55@Railgun_Qu@15:

; 9582 :             return((pbTarget-2));

  046ee	8d 46 fe	 lea	 eax, DWORD PTR [esi-2]

; 9609 :             return(NULL);

  046f1	eb a8		 jmp	 SHORT $LN73@Railgun_Qu@15
$LN41@Railgun_Qu@15:

; 9610 :     }
; 9611 : } else { //if ( cbPattern<4)
; 9612 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  046f3	3d c1 03 00 00	 cmp	 eax, 961		; 000003c1H

; 9613 : {
; 9614 :         pbTarget = pbTarget+cbPattern;
; 9615 :         ulHashPattern = *(unsigned long *)(pbPattern);

  046f8	8b 03		 mov	 eax, DWORD PTR [ebx]
  046fa	89 44 24 14	 mov	 DWORD PTR _ulHashPattern$[esp+1080], eax
  046fe	0f 83 dc 00 00
	00		 jae	 $LN26@Railgun_Qu@15

; 9616 : //        countSTATIC = cbPattern-1;
; 9617 : 
; 9618 :     //SINGLET = *(char *)(pbPattern);
; 9619 :     SINGLET = ulHashPattern & 0xFF;
; 9620 :     Quadruplet2nd = SINGLET<<8;

  04704	0f b6 c0	 movzx	 eax, al
  04707	8b f8		 mov	 edi, eax

; 9621 :     Quadruplet3rd = SINGLET<<16;

  04709	8b c8		 mov	 ecx, eax
  0470b	c1 e7 08	 shl	 edi, 8
  0470e	c1 e1 10	 shl	 ecx, 16			; 00000010H
  04711	03 f2		 add	 esi, edx
  04713	89 44 24 24	 mov	 DWORD PTR tv531[esp+1080], eax

; 9622 :     Quadruplet4th = SINGLET<<24;

  04717	c1 e0 18	 shl	 eax, 24			; 00000018H
  0471a	89 7c 24 1c	 mov	 DWORD PTR _Quadruplet2nd$[esp+1080], edi
  0471e	89 4c 24 2c	 mov	 DWORD PTR _Quadruplet3rd$[esp+1080], ecx
  04722	89 44 24 30	 mov	 DWORD PTR _Quadruplet4th$[esp+1080], eax
$LL25@Railgun_Qu@15:

; 9623 : 
; 9624 :     for ( ;; )
; 9625 :     {
; 9626 : 	AdvanceHopperGrass = 0;
; 9627 : 	ulHashTarget = *(unsigned long *)(pbTarget-cbPattern);

  04726	8b c6		 mov	 eax, esi
  04728	2b c2		 sub	 eax, edx
  0472a	8b 00		 mov	 eax, DWORD PTR [eax]
  0472c	33 ed		 xor	 ebp, ebp
  0472e	89 6c 24 18	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], ebp

; 9628 : 
; 9629 :         if ( ulHashPattern == ulHashTarget ) { // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.

  04732	39 44 24 14	 cmp	 DWORD PTR _ulHashPattern$[esp+1080], eax
  04736	75 5d		 jne	 SHORT $LN23@Railgun_Qu@15

; 9630 : //         count = countSTATIC;
; 9631 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 9632 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 9633 : //               count--;
; 9634 : //         }
; 9635 :          count = cbPattern-1;

  04738	8d 42 ff	 lea	 eax, DWORD PTR [edx-1]

; 9636 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  0473b	85 c0		 test	 eax, eax
  0473d	74 43		 je	 SHORT $LN65@Railgun_Qu@15

; 9630 : //         count = countSTATIC;
; 9631 : //         while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {
; 9632 : //	       if ( countSTATIC==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) AdvanceHopperGrass++;
; 9633 : //               count--;
; 9634 : //         }
; 9635 :          count = cbPattern-1;

  0473f	8b cb		 mov	 ecx, ebx
  04741	8b fe		 mov	 edi, esi
  04743	2b c8		 sub	 ecx, eax
  04745	2b f8		 sub	 edi, eax
  04747	03 ca		 add	 ecx, edx
  04749	8d a4 24 00 00
	00 00		 npad	 7
$LL22@Railgun_Qu@15:

; 9636 :          while ( count && *(char *)(pbPattern+(cbPattern-count)) == *(char *)(pbTarget-count) ) {

  04750	8a 1f		 mov	 bl, BYTE PTR [edi]
  04752	88 5c 24 13	 mov	 BYTE PTR tv660[esp+1080], bl
  04756	38 19		 cmp	 BYTE PTR [ecx], bl
  04758	75 31		 jne	 SHORT $LN21@Railgun_Qu@15

; 9637 : 	       if ( cbPattern-1==AdvanceHopperGrass+count && SINGLET != *(char *)(pbTarget-count) ) AdvanceHopperGrass++;

  0475a	8d 5a ff	 lea	 ebx, DWORD PTR [edx-1]
  0475d	03 e8		 add	 ebp, eax
  0475f	3b dd		 cmp	 ebx, ebp
  04761	75 16		 jne	 SHORT $LN68@Railgun_Qu@15
  04763	0f be 5c 24 13	 movsx	 ebx, BYTE PTR tv660[esp+1080]
  04768	39 5c 24 24	 cmp	 DWORD PTR tv531[esp+1080], ebx
  0476c	74 0b		 je	 SHORT $LN68@Railgun_Qu@15
  0476e	8b 6c 24 18	 mov	 ebp, DWORD PTR _AdvanceHopperGrass$[esp+1080]
  04772	45		 inc	 ebp
  04773	89 6c 24 18	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+1080], ebp
  04777	eb 04		 jmp	 SHORT $LN20@Railgun_Qu@15
$LN68@Railgun_Qu@15:
  04779	8b 6c 24 18	 mov	 ebp, DWORD PTR _AdvanceHopperGrass$[esp+1080]
$LN20@Railgun_Qu@15:

; 9638 :                count--;

  0477d	41		 inc	 ecx
  0477e	47		 inc	 edi
  0477f	48		 dec	 eax
  04780	75 ce		 jne	 SHORT $LL22@Railgun_Qu@15
$LN65@Railgun_Qu@15:

; 9639 :          }
; 9640 :          if ( count == 0) return((pbTarget-cbPattern));

  04782	8b c6		 mov	 eax, esi
  04784	2b c2		 sub	 eax, edx

; 9655 :             return(NULL);

  04786	e9 10 ff ff ff	 jmp	 $LN73@Railgun_Qu@15
$LN21@Railgun_Qu@15:

; 9639 :          }
; 9640 :          if ( count == 0) return((pbTarget-cbPattern));

  0478b	85 c0		 test	 eax, eax
  0478d	74 f3		 je	 SHORT $LN65@Railgun_Qu@15

; 9641 :         } else { // The goal here: to avoid memory accesses by stressing the registers.

  0478f	8b 5c 24 20	 mov	 ebx, DWORD PTR _pbPattern$GSCopy$[esp+1080]
  04793	eb 34		 jmp	 SHORT $LN69@Railgun_Qu@15
$LN23@Railgun_Qu@15:

; 9642 :     if ( Quadruplet2nd != (ulHashTarget & 0x0000FF00) ) {

  04795	8b c8		 mov	 ecx, eax
  04797	81 e1 00 ff 00
	00		 and	 ecx, 65280		; 0000ff00H
  0479d	3b f9		 cmp	 edi, ecx
  0479f	74 28		 je	 SHORT $LN69@Railgun_Qu@15

; 9643 :          AdvanceHopperGrass++;
; 9644 :          if ( Quadruplet3rd != (ulHashTarget & 0x00FF0000) ) {

  047a1	8b c8		 mov	 ecx, eax
  047a3	81 e1 00 00 ff
	00		 and	 ecx, 16711680		; 00ff0000H
  047a9	bd 01 00 00 00	 mov	 ebp, 1
  047ae	39 4c 24 2c	 cmp	 DWORD PTR _Quadruplet3rd$[esp+1080], ecx
  047b2	74 15		 je	 SHORT $LN69@Railgun_Qu@15

; 9645 :               AdvanceHopperGrass++;
; 9646 :               if ( Quadruplet4th != (ulHashTarget & 0xFF000000) ) AdvanceHopperGrass++;

  047b4	25 00 00 00 ff	 and	 eax, -16777216		; ff000000H
  047b9	bd 02 00 00 00	 mov	 ebp, 2
  047be	39 44 24 30	 cmp	 DWORD PTR _Quadruplet4th$[esp+1080], eax
  047c2	74 05		 je	 SHORT $LN69@Railgun_Qu@15
  047c4	bd 03 00 00 00	 mov	 ebp, 3
$LN69@Railgun_Qu@15:

; 9647 :          }
; 9648 :     }
; 9649 : 	}
; 9650 : 
; 9651 : 	AdvanceHopperGrass++;
; 9652 : 
; 9653 : 	pbTarget = pbTarget + AdvanceHopperGrass;

  047c9	8d 74 2e 01	 lea	 esi, DWORD PTR [esi+ebp+1]

; 9654 :         if (pbTarget > pbTargetMax)

  047cd	3b 74 24 28	 cmp	 esi, DWORD PTR _pbTargetMax$[esp+1080]
  047d1	0f 87 c2 fe ff
	ff		 ja	 $LN5@Railgun_Qu@15

; 9656 :     }

  047d7	8b 7c 24 1c	 mov	 edi, DWORD PTR _Quadruplet2nd$[esp+1080]
  047db	e9 46 ff ff ff	 jmp	 $LL25@Railgun_Qu@15
$LN26@Railgun_Qu@15:

; 9657 : } else { //if (cbTarget<961)
; 9658 :         //countSTATIC = cbPattern-2; //r.6+
; 9659 :         //countSTATIC = cbPattern-2-3;
; 9660 :         //countSTATIC = cbPattern-2-2; // r.6+++ I suppose that the awful degradation comes from 2bytes more (from either 'if (countSTATIC<0) countSTATIC=0;' or 'count >0' fixes) which make the function unfittable in code cache lines?!
; 9661 :         //countSTATIC = cbPattern-2-3; // r.7- At last no recompared bytes in-between chars
; 9662 :         countSTATIC = cbPattern-2-2; // r.7 
; 9663 :         ulHashPattern = *(unsigned long *)(pbPattern);
; 9664 : 
; 9665 :         //chPTR=(unsigned char *)&chchchch+3;
; 9666 : // Next line fixes the BUG from r.6++: but with awful speed degradation! So the bug is fixed in the definitions by setting 'countSTATIC = cbPattern-2-2;', bug appears only for patterns with lengths of 4, The setback is one unnecessary comparison for 5bytes patterns, stupidly such setback exists (from before) for 4bytes as well.
; 9667 : //if (countSTATIC<0) countSTATIC=0;
; 9668 :     /* Preprocessing */
; 9669 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  047e0	8b c2		 mov	 eax, edx
  047e2	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  047e7	8d 7c 24 34	 lea	 edi, DWORD PTR _bm_bc$[esp+1080]
  047eb	f3 ab		 rep stosd

; 9670 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  047ed	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  047f0	33 c0		 xor	 eax, eax
  047f2	85 c9		 test	 ecx, ecx
  047f4	74 18		 je	 SHORT $LN7@Railgun_Qu@15
  047f6	8d 7a ff	 lea	 edi, DWORD PTR [edx-1]
  047f9	8d a4 24 00 00
	00 00		 npad	 7
$LL9@Railgun_Qu@15:
  04800	0f be 2c 03	 movsx	 ebp, BYTE PTR [ebx+eax]
  04804	89 7c ac 34	 mov	 DWORD PTR _bm_bc$[esp+ebp*4+1080], edi
  04808	40		 inc	 eax
  04809	4f		 dec	 edi
  0480a	3b c1		 cmp	 eax, ecx
  0480c	72 f2		 jb	 SHORT $LL9@Railgun_Qu@15
$LN7@Railgun_Qu@15:

; 9671 : 
; 9672 :     /* Searching */
; 9673 :     //lastch=pbPattern[cbPattern-1];
; 9674 :     //firstch=pbPattern[0];
; 9675 :     i=0;
; 9676 :     while (i <= cbTarget-cbPattern) {

  0480e	8b 84 24 44 04
	00 00		 mov	 eax, DWORD PTR _cbTarget$[esp+1076]
  04815	33 ed		 xor	 ebp, ebp
  04817	2b c2		 sub	 eax, edx
  04819	89 44 24 1c	 mov	 DWORD PTR $T10696[esp+1080], eax
  0481d	8d 49 00	 npad	 3
$LL6@Railgun_Qu@15:

; 9677 :        //ch=pbTarget[i+cbPattern-1];
; 9678 :        //ch=pbTarget[i];
; 9679 :           //if ( pbTarget[i] == pbPattern[0] && *(unsigned long *)&pbTarget[i+cbPattern-1-3] == ulHashPattern) // No problema here since we have 4[+] long pattern here. Overlapping (1 byte recompared) when length=4, grmbl.
; 9680 :           if ( *(unsigned long *)&pbTarget[i] == ulHashPattern ) // The lesson I learned from r.7- now applied in r.7: instead of extracting 'ch' having higher address now the lower address is extracted first in order (hopefully, the test confirms it) the next 32bytes (including 'ch') to be cached i.e. to comparison part is faster.

  04820	8b 4c 24 14	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+1080]
  04824	39 0c 2e	 cmp	 DWORD PTR [esi+ebp], ecx
  04827	75 29		 jne	 SHORT $LN1@Railgun_Qu@15

; 9681 :              {
; 9682 :          count = countSTATIC;

  04829	8d 42 fc	 lea	 eax, DWORD PTR [edx-4]

; 9683 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  0482c	85 c0		 test	 eax, eax
  0482e	74 12		 je	 SHORT $LN59@Railgun_Qu@15

; 9681 :              {
; 9682 :          count = countSTATIC;

  04830	8d 7b 04	 lea	 edi, DWORD PTR [ebx+4]
  04833	8d 4c 2e 04	 lea	 ecx, DWORD PTR [esi+ebp+4]
$LL3@Railgun_Qu@15:

; 9683 :          while ( count !=0 && *(char *)(pbPattern+(countSTATIC-count)+4) == *(char *)(&pbTarget[i]+(countSTATIC-count)+4) ) { // if pattern length is 4 or 5 we have count=-1 and count=0 respectively i.e. no need of comparing in-between chars.

  04837	8a 1f		 mov	 bl, BYTE PTR [edi]
  04839	3a 19		 cmp	 bl, BYTE PTR [ecx]
  0483b	75 0d		 jne	 SHORT $LN2@Railgun_Qu@15

; 9684 :                count--;

  0483d	41		 inc	 ecx
  0483e	47		 inc	 edi
  0483f	48		 dec	 eax
  04840	75 f5		 jne	 SHORT $LL3@Railgun_Qu@15
$LN59@Railgun_Qu@15:

; 9685 :          }
; 9686 :          if ( count == 0) return(pbTarget+i);

  04842	8d 04 2e	 lea	 eax, DWORD PTR [esi+ebp]
  04845	e9 51 fe ff ff	 jmp	 $LN73@Railgun_Qu@15
$LN2@Railgun_Qu@15:
  0484a	85 c0		 test	 eax, eax
  0484c	74 f4		 je	 SHORT $LN59@Railgun_Qu@15
  0484e	8b 5c 24 20	 mov	 ebx, DWORD PTR _pbPattern$GSCopy$[esp+1080]
$LN1@Railgun_Qu@15:

; 9687 : 	     }
; 9688 :        i= i + bm_bc[(unsigned char)pbTarget[i+cbPattern-1]];

  04852	8d 04 2e	 lea	 eax, DWORD PTR [esi+ebp]
  04855	0f b6 4c 10 ff	 movzx	 ecx, BYTE PTR [eax+edx-1]
  0485a	03 6c 8c 34	 add	 ebp, DWORD PTR _bm_bc$[esp+ecx*4+1080]
  0485e	3b 6c 24 1c	 cmp	 ebp, DWORD PTR $T10696[esp+1080]
  04862	76 bc		 jbe	 SHORT $LL6@Railgun_Qu@15

; 9671 : 
; 9672 :     /* Searching */
; 9673 :     //lastch=pbPattern[cbPattern-1];
; 9674 :     //firstch=pbPattern[0];
; 9675 :     i=0;
; 9676 :     while (i <= cbTarget-cbPattern) {

  04864	e9 30 fe ff ff	 jmp	 $LN5@Railgun_Qu@15
_Railgun_Quadruplet_7 ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
tv542 = -1048						; size = 4
_pbPattern$GSCopy$ = -1048				; size = 4
$T10725 = -1044						; size = 4
_ulHashPattern$ = -1044					; size = 4
tv545 = -1040						; size = 4
tv413 = -1040						; size = 4
tv297 = -1036						; size = 4
_pbTargetMax$ = -1036					; size = 4
_countSTATIC$ = -1032					; size = 4
_bm_bc$ = -1028						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun PROC

; 9704 : {

  04870	81 ec 18 04 00
	00		 sub	 esp, 1048		; 00000418H
  04876	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  0487b	33 c4		 xor	 eax, esp
  0487d	89 84 24 14 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1048], eax

; 9705 :     char *  pbTargetMax = pbTarget + cbTarget;
; 9706 :     register unsigned long  ulHashPattern;
; 9707 :     unsigned long  ulHashTarget;
; 9708 :     unsigned long  count;
; 9709 :     unsigned long  countSTATIC, countRemainder;
; 9710 : 
; 9711 :     long i; //BMH needed
; 9712 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 9713 :     unsigned char ch; //BMH needed
; 9714 : //    unsigned char lastch, firstch; //BMH needed
; 9715 : 
; 9716 :     if (cbPattern > cbTarget)

  04884	8b 94 24 28 04
	00 00		 mov	 edx, DWORD PTR _cbPattern$[esp+1044]
  0488b	53		 push	 ebx
  0488c	8b 9c 24 24 04
	00 00		 mov	 ebx, DWORD PTR _pbPattern$[esp+1048]
  04893	55		 push	 ebp
  04894	8b ac 24 24 04
	00 00		 mov	 ebp, DWORD PTR _pbTarget$[esp+1052]
  0489b	56		 push	 esi
  0489c	8b b4 24 30 04
	00 00		 mov	 esi, DWORD PTR _cbTarget$[esp+1056]
  048a3	8d 04 2e	 lea	 eax, DWORD PTR [esi+ebp]

; 9795 :          }
; 9796 :          if ( count == 0) return(pbTarget+i);

  048a6	89 5c 24 0c	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1060], ebx
  048aa	89 44 24 18	 mov	 DWORD PTR _pbTargetMax$[esp+1060], eax
  048ae	3b d6		 cmp	 edx, esi
  048b0	76 1a		 jbe	 SHORT $LN22@Railgun

; 9717 :         return(NULL);

  048b2	5e		 pop	 esi
  048b3	5d		 pop	 ebp
  048b4	33 c0		 xor	 eax, eax
  048b6	5b		 pop	 ebx

; 9801 : }
; 9802 : }

  048b7	8b 8c 24 14 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1048]
  048be	33 cc		 xor	 ecx, esp
  048c0	e8 00 00 00 00	 call	 @__security_check_cookie@4
  048c5	81 c4 18 04 00
	00		 add	 esp, 1048		; 00000418H
  048cb	c3		 ret	 0
$LN22@Railgun:

; 9718 : 
; 9719 :         countSTATIC = cbPattern-2;

  048cc	8d 4a fe	 lea	 ecx, DWORD PTR [edx-2]
  048cf	57		 push	 edi
  048d0	89 4c 24 20	 mov	 DWORD PTR _countSTATIC$[esp+1064], ecx

; 9720 : 
; 9721 : // Doesn't work when cbPattern = 1
; 9722 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  048d4	81 fe c1 03 00
	00		 cmp	 esi, 961		; 000003c1H
  048da	0f 83 94 00 00
	00		 jae	 $LN21@Railgun

; 9723 : {
; 9724 :         pbTarget = pbTarget+cbPattern;
; 9725 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  048e0	0f be 03	 movsx	 eax, BYTE PTR [ebx]
  048e3	0f be 4c 13 ff	 movsx	 ecx, BYTE PTR [ebx+edx-1]
  048e8	c1 e0 08	 shl	 eax, 8
  048eb	03 c8		 add	 ecx, eax

; 9773 :     }

  048ed	b8 02 00 00 00	 mov	 eax, 2
  048f2	2b c2		 sub	 eax, edx
  048f4	bf 01 00 00 00	 mov	 edi, 1
  048f9	03 ea		 add	 ebp, edx
  048fb	2b fa		 sub	 edi, edx
  048fd	89 4c 24 14	 mov	 DWORD PTR _ulHashPattern$[esp+1064], ecx
  04901	89 44 24 10	 mov	 DWORD PTR tv542[esp+1064], eax
  04905	89 7c 24 18	 mov	 DWORD PTR tv545[esp+1064], edi
  04909	8d a4 24 00 00
	00 00		 npad	 7
$LL20@Railgun:

; 9726 : 
; 9727 :     for ( ;; )
; 9728 :     {
; 9729 :         // The line below gives for 'cbPattern'>=1:
; 9730 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 9731 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 9732 : /*
; 9733 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 9734 :             return((long)(pbTarget-cbPattern));
; 9735 : */
; 9736 : 
; 9737 :         // The fragment below gives for 'cbPattern'>=2:
; 9738 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 9739 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 9740 : 
; 9741 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {

  04910	0f be 44 2f ff	 movsx	 eax, BYTE PTR [edi+ebp-1]
  04915	0f be 75 ff	 movsx	 esi, BYTE PTR [ebp-1]
  04919	c1 e0 08	 shl	 eax, 8
  0491c	03 c6		 add	 eax, esi
  0491e	3b c8		 cmp	 ecx, eax
  04920	75 30		 jne	 SHORT $LN43@Railgun

; 9742 :          count = countSTATIC;

  04922	8b 44 24 20	 mov	 eax, DWORD PTR _countSTATIC$[esp+1064]

; 9743 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {

  04926	85 c0		 test	 eax, eax
  04928	74 16		 je	 SHORT $LN39@Railgun

; 9742 :          count = countSTATIC;

  0492a	8b 4c 24 10	 mov	 ecx, DWORD PTR tv542[esp+1064]
  0492e	8d 7b 01	 lea	 edi, DWORD PTR [ebx+1]
  04931	8d 74 29 ff	 lea	 esi, DWORD PTR [ecx+ebp-1]
$LL17@Railgun:

; 9743 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {

  04935	8a 0f		 mov	 cl, BYTE PTR [edi]
  04937	3a 0e		 cmp	 cl, BYTE PTR [esi]
  04939	75 0b		 jne	 SHORT $LN16@Railgun

; 9744 :                count--;

  0493b	46		 inc	 esi
  0493c	47		 inc	 edi
  0493d	48		 dec	 eax
  0493e	75 f5		 jne	 SHORT $LL17@Railgun
$LN39@Railgun:

; 9745 :          }
; 9746 :          if ( count == 0) return((pbTarget-cbPattern));

  04940	8b c5		 mov	 eax, ebp
  04942	2b c2		 sub	 eax, edx

; 9772 :             return(NULL);

  04944	eb 15		 jmp	 SHORT $LN44@Railgun
$LN16@Railgun:

; 9745 :          }
; 9746 :          if ( count == 0) return((pbTarget-cbPattern));

  04946	85 c0		 test	 eax, eax
  04948	74 f6		 je	 SHORT $LN39@Railgun
  0494a	8b 4c 24 14	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+1064]
  0494e	8b 7c 24 18	 mov	 edi, DWORD PTR tv545[esp+1064]
$LN43@Railgun:

; 9747 :         }
; 9748 : 
; 9749 :         // The fragment below gives for 'cbPattern'>=2:
; 9750 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 9751 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 9752 : /*
; 9753 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 9754 :          count = countSTATIC>>2;
; 9755 :          countRemainder = countSTATIC % 4;
; 9756 : 
; 9757 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 9758 :                count--;
; 9759 :          }
; 9760 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 9761 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 9762 :                countRemainder--;
; 9763 :          }
; 9764 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 9765 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 9766 :          //}
; 9767 :         }
; 9768 : */
; 9769 : 
; 9770 :         pbTarget++;

  04952	45		 inc	 ebp

; 9771 :         if (pbTarget > pbTargetMax)

  04953	3b 6c 24 1c	 cmp	 ebp, DWORD PTR _pbTargetMax$[esp+1064]
  04957	76 b7		 jbe	 SHORT $LL20@Railgun
$LN5@Railgun:

; 9799 :     }
; 9800 :     return(NULL);

  04959	33 c0		 xor	 eax, eax
$LN44@Railgun:

; 9801 : }
; 9802 : }

  0495b	8b 8c 24 24 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1064]
  04962	5f		 pop	 edi
  04963	5e		 pop	 esi
  04964	5d		 pop	 ebp
  04965	5b		 pop	 ebx
  04966	33 cc		 xor	 ecx, esp
  04968	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0496d	81 c4 18 04 00
	00		 add	 esp, 1048		; 00000418H
  04973	c3		 ret	 0
$LN21@Railgun:

; 9774 : }
; 9775 : else
; 9776 : {
; 9777 :     /* Preprocessing */
; 9778 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  04974	8b c2		 mov	 eax, edx
  04976	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  0497b	8d 7c 24 24	 lea	 edi, DWORD PTR _bm_bc$[esp+1064]
  0497f	f3 ab		 rep stosd

; 9779 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  04981	8d 7a ff	 lea	 edi, DWORD PTR [edx-1]
  04984	33 c0		 xor	 eax, eax
  04986	85 ff		 test	 edi, edi
  04988	74 18		 je	 SHORT $LN7@Railgun
  0498a	8d 4a ff	 lea	 ecx, DWORD PTR [edx-1]
  0498d	8d 49 00	 npad	 3
$LL42@Railgun:
  04990	0f be 1c 03	 movsx	 ebx, BYTE PTR [ebx+eax]
  04994	89 4c 9c 24	 mov	 DWORD PTR _bm_bc$[esp+ebx*4+1064], ecx
  04998	8b 5c 24 10	 mov	 ebx, DWORD PTR _pbPattern$GSCopy$[esp+1064]
  0499c	40		 inc	 eax
  0499d	49		 dec	 ecx
  0499e	3b c7		 cmp	 eax, edi
  049a0	72 ee		 jb	 SHORT $LL42@Railgun
$LN7@Railgun:

; 9780 : 
; 9781 :     /* Searching */
; 9782 :     //lastch=pbPattern[cbPattern-1];
; 9783 :     //firstch=pbPattern[0];
; 9784 :     i=0;

  049a2	33 ff		 xor	 edi, edi

; 9785 :     while (i <= cbTarget-cbPattern) {

  049a4	2b f2		 sub	 esi, edx
  049a6	8d 44 2a ff	 lea	 eax, DWORD PTR [edx+ebp-1]
  049aa	0f be 54 13 ff	 movsx	 edx, BYTE PTR [ebx+edx-1]
  049af	89 74 24 14	 mov	 DWORD PTR $T10725[esp+1064], esi
  049b3	89 44 24 18	 mov	 DWORD PTR tv413[esp+1064], eax
  049b7	89 54 24 1c	 mov	 DWORD PTR tv297[esp+1064], edx
  049bb	eb 03 8d 49 00	 npad	 5
$LL6@Railgun:

; 9786 :        ch=pbTarget[i+cbPattern-1];
; 9787 :        //if (ch ==lastch)
; 9788 :           //if (memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) OUTPUT(i);
; 9789 :           //if (ch == lastch && pbTarget[i] == firstch && memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 9790 :           if (ch == pbPattern[cbPattern-1] && pbTarget[i] == pbPattern[0])

  049c0	0f b6 0c 38	 movzx	 ecx, BYTE PTR [eax+edi]
  049c4	3b 4c 24 1c	 cmp	 ecx, DWORD PTR tv297[esp+1064]
  049c8	75 31		 jne	 SHORT $LN1@Railgun
  049ca	8a 0c 2f	 mov	 cl, BYTE PTR [edi+ebp]
  049cd	3a 0b		 cmp	 cl, BYTE PTR [ebx]
  049cf	75 2a		 jne	 SHORT $LN1@Railgun

; 9791 :              {
; 9792 :          count = countSTATIC;

  049d1	8b 44 24 20	 mov	 eax, DWORD PTR _countSTATIC$[esp+1064]

; 9793 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) {

  049d5	85 c0		 test	 eax, eax
  049d7	74 12		 je	 SHORT $LN33@Railgun

; 9791 :              {
; 9792 :          count = countSTATIC;

  049d9	8d 73 01	 lea	 esi, DWORD PTR [ebx+1]
  049dc	8d 4c 2f 01	 lea	 ecx, DWORD PTR [edi+ebp+1]
$LL3@Railgun:

; 9793 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) {

  049e0	8a 16		 mov	 dl, BYTE PTR [esi]
  049e2	3a 11		 cmp	 dl, BYTE PTR [ecx]
  049e4	75 0d		 jne	 SHORT $LN2@Railgun

; 9794 :                count--;

  049e6	41		 inc	 ecx
  049e7	46		 inc	 esi
  049e8	48		 dec	 eax
  049e9	75 f5		 jne	 SHORT $LL3@Railgun
$LN33@Railgun:

; 9795 :          }
; 9796 :          if ( count == 0) return(pbTarget+i);

  049eb	8d 04 2f	 lea	 eax, DWORD PTR [edi+ebp]
  049ee	e9 68 ff ff ff	 jmp	 $LN44@Railgun
$LN2@Railgun:
  049f3	85 c0		 test	 eax, eax
  049f5	74 f4		 je	 SHORT $LN33@Railgun
  049f7	8b 44 24 18	 mov	 eax, DWORD PTR tv413[esp+1064]
$LN1@Railgun:

; 9797 : 	     }
; 9798 :        i+=bm_bc[ch];

  049fb	0f b6 0c 38	 movzx	 ecx, BYTE PTR [eax+edi]
  049ff	03 7c 8c 24	 add	 edi, DWORD PTR _bm_bc$[esp+ecx*4+1064]
  04a03	3b 7c 24 14	 cmp	 edi, DWORD PTR $T10725[esp+1064]
  04a07	76 b7		 jbe	 SHORT $LL6@Railgun

; 9785 :     while (i <= cbTarget-cbPattern) {

  04a09	e9 4b ff ff ff	 jmp	 $LN5@Railgun
_Railgun ENDP
_TEXT	ENDS
PUBLIC	_pbPattern$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_Railgun_totalhits
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
tv547 = -1052						; size = 4
$T10749 = -1052						; size = 4
tv550 = -1048						; size = 4
tv357 = -1048						; size = 4
tv415 = -1044						; size = 4
_pbTargetMax$ = -1044					; size = 4
_pbPattern$GSCopy$ = -1040				; size = 4
_countSTATIC$ = -1036					; size = 4
_bm_bc$ = -1032						; size = 1024
__$ArrayPad$ = -4					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_Railgun_totalhits PROC

; 9811 : {

  04a10	55		 push	 ebp
  04a11	8b ec		 mov	 ebp, esp
  04a13	83 e4 f8	 and	 esp, -8			; fffffff8H
  04a16	81 ec 1c 04 00
	00		 sub	 esp, 1052		; 0000041cH
  04a1c	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  04a21	33 c4		 xor	 eax, esp
  04a23	89 84 24 18 04
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1052], eax

; 9812 :     char *  pbTargetMax = pbTarget + cbTarget;

  04a2a	8b 55 10	 mov	 edx, DWORD PTR _cbTarget$[ebp]
  04a2d	53		 push	 ebx
  04a2e	8b 5d 08	 mov	 ebx, DWORD PTR _pbTarget$[ebp]
  04a31	8d 04 13	 lea	 eax, DWORD PTR [ebx+edx]
  04a34	56		 push	 esi
  04a35	8b 75 0c	 mov	 esi, DWORD PTR _pbPattern$[ebp]
  04a38	89 44 24 10	 mov	 DWORD PTR _pbTargetMax$[esp+1060], eax

; 9813 :     register unsigned long  ulHashPattern;
; 9814 :     unsigned long  ulHashTarget;
; 9815 :     unsigned long  count;
; 9816 :     unsigned long  countSTATIC, countRemainder;
; 9817 : 
; 9818 :     long i; //BMH needed
; 9819 :     int a, j, bm_bc[ASIZE]; //BMH needed
; 9820 :     unsigned char ch; //BMH needed
; 9821 : //    unsigned char lastch, firstch; //BMH needed
; 9822 : 
; 9823 :     if (cbPattern > cbTarget)

  04a3c	8b 45 14	 mov	 eax, DWORD PTR _cbPattern$[ebp]
  04a3f	57		 push	 edi

; 9904 : 	     }
; 9905 :        i+=bm_bc[ch];

  04a40	89 74 24 18	 mov	 DWORD PTR _pbPattern$GSCopy$[esp+1064], esi
  04a44	3b c2		 cmp	 eax, edx
  04a46	0f 87 4a 01 00
	00		 ja	 $LN47@Railgun_to

; 9824 :         return(NULL);
; 9825 : 
; 9826 :         countSTATIC = cbPattern-2;

  04a4c	8d 48 fe	 lea	 ecx, DWORD PTR [eax-2]
  04a4f	89 4c 24 1c	 mov	 DWORD PTR _countSTATIC$[esp+1064], ecx

; 9827 : 
; 9828 : // Doesn't work when cbPattern = 1
; 9829 : if (cbTarget<961) // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.

  04a53	81 fa c1 03 00
	00		 cmp	 edx, 961		; 000003c1H
  04a59	0f 83 96 00 00
	00		 jae	 $LN21@Railgun_to

; 9830 : {
; 9831 :         pbTarget = pbTarget+cbPattern;
; 9832 :         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  04a5f	0f be 16	 movsx	 edx, BYTE PTR [esi]
  04a62	0f be 7c 06 ff	 movsx	 edi, BYTE PTR [esi+eax-1]
  04a67	c1 e2 08	 shl	 edx, 8
  04a6a	03 fa		 add	 edi, edx

; 9878 :         if (pbTarget > pbTargetMax)

  04a6c	b9 02 00 00 00	 mov	 ecx, 2
  04a71	2b c8		 sub	 ecx, eax
  04a73	ba 01 00 00 00	 mov	 edx, 1
  04a78	03 d8		 add	 ebx, eax
  04a7a	2b d0		 sub	 edx, eax
  04a7c	89 4c 24 0c	 mov	 DWORD PTR tv547[esp+1064], ecx
  04a80	89 54 24 10	 mov	 DWORD PTR tv550[esp+1064], edx
  04a84	eb 16		 jmp	 SHORT $LN20@Railgun_to
  04a86	eb 08 8d a4 24
	00 00 00 00 90	 npad	 10
$LL44@Railgun_to:
  04a90	8b 4c 24 0c	 mov	 ecx, DWORD PTR tv547[esp+1064]
  04a94	8b 54 24 10	 mov	 edx, DWORD PTR tv550[esp+1064]
  04a98	8b 74 24 18	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1064]
$LN20@Railgun_to:

; 9833 : 
; 9834 :     for ( ;; )
; 9835 :     {
; 9836 :         // The line below gives for 'cbPattern'>=1:
; 9837 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/543
; 9838 :         // Karp_Rabin_Kaze_4_OCTETS performance: 372KB/clock
; 9839 : /*
; 9840 :         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 9841 :             return((long)(pbTarget-cbPattern));
; 9842 : */
; 9843 : 
; 9844 :         // The fragment below gives for 'cbPattern'>=2:
; 9845 :         // Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/546
; 9846 :         // Karp_Rabin_Kaze_4_OCTETS performance: 370KB/clock
; 9847 : 
; 9848 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {

  04a9c	0f be 44 1a ff	 movsx	 eax, BYTE PTR [edx+ebx-1]
  04aa1	0f be 53 ff	 movsx	 edx, BYTE PTR [ebx-1]
  04aa5	c1 e0 08	 shl	 eax, 8
  04aa8	03 c2		 add	 eax, edx
  04aaa	3b f8		 cmp	 edi, eax
  04aac	75 29		 jne	 SHORT $LN15@Railgun_to

; 9849 :          count = countSTATIC;

  04aae	8b 44 24 1c	 mov	 eax, DWORD PTR _countSTATIC$[esp+1064]

; 9850 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {

  04ab2	85 c0		 test	 eax, eax
  04ab4	74 1b		 je	 SHORT $LN38@Railgun_to

; 9849 :          count = countSTATIC;

  04ab6	46		 inc	 esi
  04ab7	8d 4c 19 ff	 lea	 ecx, DWORD PTR [ecx+ebx-1]
  04abb	eb 03 8d 49 00	 npad	 5
$LL17@Railgun_to:

; 9850 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-count)) ) {

  04ac0	8a 16		 mov	 dl, BYTE PTR [esi]
  04ac2	3a 11		 cmp	 dl, BYTE PTR [ecx]
  04ac4	75 07		 jne	 SHORT $LN16@Railgun_to

; 9851 :                count--;

  04ac6	41		 inc	 ecx
  04ac7	46		 inc	 esi
  04ac8	48		 dec	 eax
  04ac9	75 f5		 jne	 SHORT $LL17@Railgun_to

; 9852 :          }
; 9853 :          if ( count == 0) Railgunhits++; //return((pbTarget-cbPattern));

  04acb	eb 04		 jmp	 SHORT $LN38@Railgun_to
$LN16@Railgun_to:
  04acd	85 c0		 test	 eax, eax
  04acf	75 06		 jne	 SHORT $LN15@Railgun_to
$LN38@Railgun_to:
  04ad1	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN15@Railgun_to:

; 9854 :         }
; 9855 : 
; 9856 :         // The fragment below gives for 'cbPattern'>=2:
; 9857 : 	// Karp_Rabin_Kaze_4_OCTETS_hits/Karp_Rabin_Kaze_4_OCTETS_clocks: 4/554
; 9858 : 	// Karp_Rabin_Kaze_4_OCTETS performance: 364KB/clock
; 9859 : /*
; 9860 :         if ( ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1) ) {
; 9861 :          count = countSTATIC>>2;
; 9862 :          countRemainder = countSTATIC % 4;
; 9863 : 
; 9864 :          while ( count && *(unsigned long *)(pbPattern+1+((count-1)<<2)) == *(unsigned long *)(pbTarget-cbPattern+1+((count-1)<<2)) ) {
; 9865 :                count--;
; 9866 :          }
; 9867 : 	 //if (count == 0) {  // Disastrous degradation only from this line(317KB/clock when 1+2x4+2+1 bytes pattern: 'skillessness'; 312KB/clock when 1+1x4+2+1 bytes pattern: 'underdog'), otherwise 368KB/clock.
; 9868 :          while ( countRemainder && *(char *)(pbPattern+1+(countSTATIC-countRemainder)) == *(char *)(pbTarget-cbPattern+1+(countSTATIC-countRemainder)) ) {
; 9869 :                countRemainder--;
; 9870 :          }
; 9871 :          //if ( countRemainder == 0) return((long)(pbTarget-cbPattern));
; 9872 :          if ( count+countRemainder == 0) return((long)(pbTarget-cbPattern));
; 9873 :          //}
; 9874 :         }
; 9875 : */
; 9876 : 
; 9877 :         pbTarget++;

  04ad7	43		 inc	 ebx

; 9878 :         if (pbTarget > pbTargetMax)

  04ad8	3b 5c 24 14	 cmp	 ebx, DWORD PTR _pbTargetMax$[esp+1064]
  04adc	76 b2		 jbe	 SHORT $LL44@Railgun_to

; 9906 :     }
; 9907 :     return(NULL);

  04ade	33 c0		 xor	 eax, eax

; 9908 : }
; 9909 : }

  04ae0	5f		 pop	 edi
  04ae1	5e		 pop	 esi
  04ae2	5b		 pop	 ebx
  04ae3	8b 8c 24 18 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1052]
  04aea	33 cc		 xor	 ecx, esp
  04aec	e8 00 00 00 00	 call	 @__security_check_cookie@4
  04af1	8b e5		 mov	 esp, ebp
  04af3	5d		 pop	 ebp
  04af4	c3		 ret	 0
$LN21@Railgun_to:

; 9879 :             return(NULL);
; 9880 :     }
; 9881 : }
; 9882 : else
; 9883 : {
; 9884 :     /* Preprocessing */
; 9885 :     for (a=0; a < ASIZE; a++) bm_bc[a]=cbPattern;

  04af5	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  04afa	8d 7c 24 20	 lea	 edi, DWORD PTR _bm_bc$[esp+1064]
  04afe	f3 ab		 rep stosd

; 9886 :     for (j=0; j < cbPattern-1; j++) bm_bc[pbPattern[j]]=cbPattern-j-1;

  04b00	8d 70 ff	 lea	 esi, DWORD PTR [eax-1]
  04b03	33 c9		 xor	 ecx, ecx
  04b05	85 f6		 test	 esi, esi
  04b07	74 18		 je	 SHORT $LN7@Railgun_to
  04b09	8d 78 ff	 lea	 edi, DWORD PTR [eax-1]
$LN9@Railgun_to:
  04b0c	8b 74 24 18	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1064]
  04b10	0f be 34 0e	 movsx	 esi, BYTE PTR [esi+ecx]
  04b14	89 7c b4 20	 mov	 DWORD PTR _bm_bc$[esp+esi*4+1064], edi
  04b18	41		 inc	 ecx
  04b19	8d 70 ff	 lea	 esi, DWORD PTR [eax-1]
  04b1c	4f		 dec	 edi
  04b1d	3b ce		 cmp	 ecx, esi
  04b1f	72 eb		 jb	 SHORT $LN9@Railgun_to
$LN7@Railgun_to:

; 9887 : 
; 9888 :     /* Searching */
; 9889 :     //lastch=pbPattern[cbPattern-1];
; 9890 :     //firstch=pbPattern[0];
; 9891 :     i=0;

  04b21	33 ff		 xor	 edi, edi

; 9892 :     while (i <= cbTarget-cbPattern) {

  04b23	2b d0		 sub	 edx, eax
  04b25	8d 4c 03 ff	 lea	 ecx, DWORD PTR [ebx+eax-1]
  04b29	89 54 24 0c	 mov	 DWORD PTR $T10749[esp+1064], edx
  04b2d	89 4c 24 14	 mov	 DWORD PTR tv415[esp+1064], ecx
$LN6@Railgun_to:

; 9893 :        ch=pbTarget[i+cbPattern-1];
; 9894 :        //if (ch ==lastch)
; 9895 :           //if (memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) OUTPUT(i);
; 9896 :           //if (ch == lastch && pbTarget[i] == firstch && memcmp(&pbTarget[i],pbPattern,cbPattern-1) == 0) return(i);  // Kaze: The idea(to prevent execution of slower 'memcmp') is borrowed from Karp-Rabin i.e. to perform a slower check only when the target "looks like".
; 9897 :           if (ch == pbPattern[cbPattern-1] && pbTarget[i] == pbPattern[0])

  04b31	8b 54 24 14	 mov	 edx, DWORD PTR tv415[esp+1064]
  04b35	0f b6 0c 3a	 movzx	 ecx, BYTE PTR [edx+edi]
  04b39	8b 74 24 18	 mov	 esi, DWORD PTR _pbPattern$GSCopy$[esp+1064]
  04b3d	0f be 54 06 ff	 movsx	 edx, BYTE PTR [esi+eax-1]
  04b42	89 4c 24 10	 mov	 DWORD PTR tv357[esp+1064], ecx
  04b46	3b ca		 cmp	 ecx, edx
  04b48	75 3e		 jne	 SHORT $LN1@Railgun_to
  04b4a	8a 0c 1f	 mov	 cl, BYTE PTR [edi+ebx]
  04b4d	3a 0e		 cmp	 cl, BYTE PTR [esi]
  04b4f	75 37		 jne	 SHORT $LN1@Railgun_to

; 9898 :              {
; 9899 :          count = countSTATIC;

  04b51	8b 4c 24 1c	 mov	 ecx, DWORD PTR _countSTATIC$[esp+1064]

; 9900 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) {

  04b55	85 c9		 test	 ecx, ecx
  04b57	74 24		 je	 SHORT $LN37@Railgun_to

; 9898 :              {
; 9899 :          count = countSTATIC;

  04b59	46		 inc	 esi
  04b5a	8d 54 1f 01	 lea	 edx, DWORD PTR [edi+ebx+1]
  04b5e	8b ff		 npad	 2
$LL3@Railgun_to:

; 9900 :          while ( count && *(char *)(pbPattern+1+(countSTATIC-count)) == *(char *)(&pbTarget[i]+1+(countSTATIC-count)) ) {

  04b60	8a 1e		 mov	 bl, BYTE PTR [esi]
  04b62	3a 1a		 cmp	 bl, BYTE PTR [edx]
  04b64	75 10		 jne	 SHORT $LN2@Railgun_to

; 9901 :                count--;

  04b66	42		 inc	 edx
  04b67	46		 inc	 esi
  04b68	49		 dec	 ecx
  04b69	75 f5		 jne	 SHORT $LL3@Railgun_to

; 9902 :          }
; 9903 :          if ( count == 0) Railgunhits++; //return(pbTarget+i);

  04b6b	8b 5d 08	 mov	 ebx, DWORD PTR _pbTarget$[ebp]
  04b6e	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  04b74	eb 12		 jmp	 SHORT $LN1@Railgun_to
$LN2@Railgun_to:
  04b76	85 c9		 test	 ecx, ecx
  04b78	75 0b		 jne	 SHORT $LN39@Railgun_to
  04b7a	8b 5d 08	 mov	 ebx, DWORD PTR _pbTarget$[ebp]
$LN37@Railgun_to:
  04b7d	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  04b83	eb 03		 jmp	 SHORT $LN1@Railgun_to
$LN39@Railgun_to:
  04b85	8b 5d 08	 mov	 ebx, DWORD PTR _pbTarget$[ebp]
$LN1@Railgun_to:

; 9904 : 	     }
; 9905 :        i+=bm_bc[ch];

  04b88	8b 54 24 10	 mov	 edx, DWORD PTR tv357[esp+1064]
  04b8c	03 7c 94 20	 add	 edi, DWORD PTR _bm_bc$[esp+edx*4+1064]
  04b90	3b 7c 24 0c	 cmp	 edi, DWORD PTR $T10749[esp+1064]
  04b94	76 9b		 jbe	 SHORT $LN6@Railgun_to
$LN47@Railgun_to:

; 9908 : }
; 9909 : }

  04b96	8b 8c 24 24 04
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1064]
  04b9d	5f		 pop	 edi
  04b9e	5e		 pop	 esi
  04b9f	5b		 pop	 ebx
  04ba0	33 cc		 xor	 ecx, esp
  04ba2	33 c0		 xor	 eax, eax
  04ba4	e8 00 00 00 00	 call	 @__security_check_cookie@4
  04ba9	8b e5		 mov	 esp, ebp
  04bab	5d		 pop	 ebp
  04bac	c3		 ret	 0
_Railgun_totalhits ENDP
_TEXT	ENDS
PUBLIC	_maxSuf
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_x$ = 8							; size = 4
_m$ = 12						; size = 4
_p$ = 16						; size = 4
_maxSuf	PROC

; 9918 :    int ms, j, k;
; 9919 :    char a, b;
; 9920 : 
; 9921 :    ms = -1;
; 9922 :    j = 0;
; 9923 :    k = *p = 1;

  04bb0	8b 54 24 0c	 mov	 edx, DWORD PTR _p$[esp-4]
  04bb4	b9 01 00 00 00	 mov	 ecx, 1
  04bb9	56		 push	 esi
  04bba	83 c8 ff	 or	 eax, -1
  04bbd	33 f6		 xor	 esi, esi
  04bbf	89 0a		 mov	 DWORD PTR [edx], ecx

; 9924 :    while (j + k < m) {

  04bc1	39 4c 24 0c	 cmp	 DWORD PTR _m$[esp], ecx
  04bc5	7e 58		 jle	 SHORT $LN7@maxSuf
  04bc7	53		 push	 ebx
  04bc8	55		 push	 ebp
  04bc9	8b 6c 24 10	 mov	 ebp, DWORD PTR _x$[esp+8]
  04bcd	57		 push	 edi
  04bce	8b ff		 npad	 2
$LL8@maxSuf:

; 9925 :       a = x[j + k];

  04bd0	8d 3c 31	 lea	 edi, DWORD PTR [ecx+esi]
  04bd3	8a 14 2f	 mov	 dl, BYTE PTR [edi+ebp]

; 9926 :       b = x[ms + k];

  04bd6	8d 1c 01	 lea	 ebx, DWORD PTR [ecx+eax]
  04bd9	8a 1c 2b	 mov	 bl, BYTE PTR [ebx+ebp]

; 9927 :       if (a < b) {

  04bdc	3a d3		 cmp	 dl, bl
  04bde	7d 0e		 jge	 SHORT $LN13@maxSuf

; 9928 :          j += k;

  04be0	8b f7		 mov	 esi, edi

; 9929 :          k = 1;
; 9930 :          *p = j - ms;

  04be2	8b 7c 24 1c	 mov	 edi, DWORD PTR _p$[esp+12]
  04be6	8b d6		 mov	 edx, esi
  04be8	2b d0		 sub	 edx, eax
  04bea	89 17		 mov	 DWORD PTR [edi], edx

; 9931 :       }
; 9932 :       else

  04bec	eb 20		 jmp	 SHORT $LN14@maxSuf
$LN13@maxSuf:

; 9933 :          if (a == b)

  04bee	75 11		 jne	 SHORT $LN4@maxSuf

; 9934 :             if (k != *p)

  04bf0	8b 54 24 1c	 mov	 edx, DWORD PTR _p$[esp+12]
  04bf4	8b 12		 mov	 edx, DWORD PTR [edx]
  04bf6	3b ca		 cmp	 ecx, edx
  04bf8	74 03		 je	 SHORT $LN3@maxSuf

; 9935 :                ++k;

  04bfa	41		 inc	 ecx

; 9936 :             else {

  04bfb	eb 16		 jmp	 SHORT $LN1@maxSuf
$LN3@maxSuf:

; 9937 :                j += *p;

  04bfd	03 f2		 add	 esi, edx

; 9938 :                k = 1;
; 9939 :             }
; 9940 :          else { /* a > b */

  04bff	eb 0d		 jmp	 SHORT $LN14@maxSuf
$LN4@maxSuf:

; 9941 :             ms = j;
; 9942 :             j = ms + 1;
; 9943 :             k = *p = 1;

  04c01	8b 4c 24 1c	 mov	 ecx, DWORD PTR _p$[esp+12]
  04c05	8b c6		 mov	 eax, esi
  04c07	46		 inc	 esi
  04c08	c7 01 01 00 00
	00		 mov	 DWORD PTR [ecx], 1
$LN14@maxSuf:
  04c0e	b9 01 00 00 00	 mov	 ecx, 1
$LN1@maxSuf:

; 9924 :    while (j + k < m) {

  04c13	8d 14 31	 lea	 edx, DWORD PTR [ecx+esi]
  04c16	3b 54 24 18	 cmp	 edx, DWORD PTR _m$[esp+12]
  04c1a	7c b4		 jl	 SHORT $LL8@maxSuf
  04c1c	5f		 pop	 edi
  04c1d	5d		 pop	 ebp
  04c1e	5b		 pop	 ebx
$LN7@maxSuf:
  04c1f	5e		 pop	 esi

; 9944 :          }
; 9945 :    }
; 9946 :    return(ms);
; 9947 : }

  04c20	c3		 ret	 0
_maxSuf	ENDP
_TEXT	ENDS
PUBLIC	_maxSufTilde
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_x$ = 8							; size = 4
_m$ = 12						; size = 4
_p$ = 16						; size = 4
_maxSufTilde PROC

; 9951 :    int ms, j, k;
; 9952 :    char a, b;
; 9953 : 
; 9954 :    ms = -1;
; 9955 :    j = 0;
; 9956 :    k = *p = 1;

  04c30	8b 54 24 0c	 mov	 edx, DWORD PTR _p$[esp-4]
  04c34	b9 01 00 00 00	 mov	 ecx, 1
  04c39	56		 push	 esi
  04c3a	83 c8 ff	 or	 eax, -1
  04c3d	33 f6		 xor	 esi, esi
  04c3f	89 0a		 mov	 DWORD PTR [edx], ecx

; 9957 :    while (j + k < m) {

  04c41	39 4c 24 0c	 cmp	 DWORD PTR _m$[esp], ecx
  04c45	7e 58		 jle	 SHORT $LN7@maxSufTild
  04c47	53		 push	 ebx
  04c48	55		 push	 ebp
  04c49	8b 6c 24 10	 mov	 ebp, DWORD PTR _x$[esp+8]
  04c4d	57		 push	 edi
  04c4e	8b ff		 npad	 2
$LL8@maxSufTild:

; 9958 :       a = x[j + k];

  04c50	8d 3c 31	 lea	 edi, DWORD PTR [ecx+esi]
  04c53	8a 14 2f	 mov	 dl, BYTE PTR [edi+ebp]

; 9959 :       b = x[ms + k];

  04c56	8d 1c 01	 lea	 ebx, DWORD PTR [ecx+eax]
  04c59	8a 1c 2b	 mov	 bl, BYTE PTR [ebx+ebp]

; 9960 :       if (a > b) {

  04c5c	3a d3		 cmp	 dl, bl
  04c5e	7e 0e		 jle	 SHORT $LN13@maxSufTild

; 9961 :          j += k;

  04c60	8b f7		 mov	 esi, edi

; 9962 :          k = 1;
; 9963 :          *p = j - ms;

  04c62	8b 7c 24 1c	 mov	 edi, DWORD PTR _p$[esp+12]
  04c66	8b d6		 mov	 edx, esi
  04c68	2b d0		 sub	 edx, eax
  04c6a	89 17		 mov	 DWORD PTR [edi], edx

; 9964 :       }
; 9965 :       else

  04c6c	eb 20		 jmp	 SHORT $LN14@maxSufTild
$LN13@maxSufTild:

; 9966 :          if (a == b)

  04c6e	75 11		 jne	 SHORT $LN4@maxSufTild

; 9967 :             if (k != *p)

  04c70	8b 54 24 1c	 mov	 edx, DWORD PTR _p$[esp+12]
  04c74	8b 12		 mov	 edx, DWORD PTR [edx]
  04c76	3b ca		 cmp	 ecx, edx
  04c78	74 03		 je	 SHORT $LN3@maxSufTild

; 9968 :                ++k;

  04c7a	41		 inc	 ecx

; 9969 :             else {

  04c7b	eb 16		 jmp	 SHORT $LN1@maxSufTild
$LN3@maxSufTild:

; 9970 :                j += *p;

  04c7d	03 f2		 add	 esi, edx

; 9971 :                k = 1;
; 9972 :             }
; 9973 :          else { /* a < b */

  04c7f	eb 0d		 jmp	 SHORT $LN14@maxSufTild
$LN4@maxSufTild:

; 9974 :             ms = j;
; 9975 :             j = ms + 1;
; 9976 :             k = *p = 1;

  04c81	8b 4c 24 1c	 mov	 ecx, DWORD PTR _p$[esp+12]
  04c85	8b c6		 mov	 eax, esi
  04c87	46		 inc	 esi
  04c88	c7 01 01 00 00
	00		 mov	 DWORD PTR [ecx], 1
$LN14@maxSufTild:
  04c8e	b9 01 00 00 00	 mov	 ecx, 1
$LN1@maxSufTild:

; 9957 :    while (j + k < m) {

  04c93	8d 14 31	 lea	 edx, DWORD PTR [ecx+esi]
  04c96	3b 54 24 18	 cmp	 edx, DWORD PTR _m$[esp+12]
  04c9a	7c b4		 jl	 SHORT $LL8@maxSufTild
  04c9c	5f		 pop	 edi
  04c9d	5d		 pop	 ebp
  04c9e	5b		 pop	 ebx
$LN7@maxSufTild:
  04c9f	5e		 pop	 esi

; 9977 :          }
; 9978 :    }
; 9979 :    return(ms);
; 9980 : }

  04ca0	c3		 ret	 0
_maxSufTilde ENDP
_TEXT	ENDS
PUBLIC	_TW
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_ell$ = -16						; size = 4
_AdvanceHopperGrass$ = -12				; size = 4
_per$ = -8						; size = 4
_p$ = -8						; size = 4
tv327 = -4						; size = 4
_q$ = -4						; size = 4
_y$ = 8							; size = 4
tv586 = 12						; size = 4
_x$ = 12						; size = 4
_n$ = 16						; size = 4
_m$ = 20						; size = 4
_TW	PROC

; 9984 : char * TW(char *y, char *x, int n, int m) {

  04cb0	83 ec 10	 sub	 esp, 16			; 00000010H
  04cb3	53		 push	 ebx
  04cb4	55		 push	 ebp

; 9985 :    int i, j, ell, memory, p, per, q;
; 9986 : 
; 9987 :     unsigned long  AdvanceHopperGrass=0;
; 9988 : 
; 9989 :    /* Preprocessing */
; 9990 :    i = maxSuf(x, m, &p);

  04cb5	8b 6c 24 28	 mov	 ebp, DWORD PTR _m$[esp+20]
  04cb9	56		 push	 esi
  04cba	57		 push	 edi
  04cbb	8b 7c 24 28	 mov	 edi, DWORD PTR _x$[esp+28]
  04cbf	8d 44 24 18	 lea	 eax, DWORD PTR _p$[esp+32]
  04cc3	50		 push	 eax
  04cc4	55		 push	 ebp
  04cc5	57		 push	 edi
  04cc6	c7 44 24 20 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+44], 0
  04cce	e8 00 00 00 00	 call	 _maxSuf

; 9991 :    j = maxSufTilde(x, m, &q);

  04cd3	8d 4c 24 28	 lea	 ecx, DWORD PTR _q$[esp+44]
  04cd7	51		 push	 ecx
  04cd8	55		 push	 ebp
  04cd9	57		 push	 edi
  04cda	8b f0		 mov	 esi, eax
  04cdc	e8 00 00 00 00	 call	 _maxSufTilde
  04ce1	83 c4 18	 add	 esp, 24			; 00000018H

; 9992 :    if (i > j) {

  04ce4	3b f0		 cmp	 esi, eax
  04ce6	7e 0c		 jle	 SHORT $LN22@TW

; 9993 :       ell = i;
; 9994 :       per = p;

  04ce8	8b 4c 24 18	 mov	 ecx, DWORD PTR _p$[esp+32]
  04cec	8b de		 mov	 ebx, esi
  04cee	89 5c 24 10	 mov	 DWORD PTR _ell$[esp+32], ebx

; 9995 :    }
; 9996 :    else {

  04cf2	eb 0a		 jmp	 SHORT $LN63@TW
$LN22@TW:

; 9997 :       ell = j;
; 9998 :       per = q;

  04cf4	8b 4c 24 1c	 mov	 ecx, DWORD PTR _q$[esp+32]
  04cf8	8b d8		 mov	 ebx, eax
  04cfa	89 44 24 10	 mov	 DWORD PTR _ell$[esp+32], eax
$LN63@TW:
  04cfe	89 4c 24 18	 mov	 DWORD PTR _per$[esp+32], ecx

; 9999 :    }
; 10000: 
; 10001:    /* Searching */
; 10002:    if (memcmp(x, x + per, ell + 1) == 0) {

  04d02	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]
  04d05	03 cf		 add	 ecx, edi
  04d07	8b f7		 mov	 esi, edi
  04d09	83 f8 04	 cmp	 eax, 4
  04d0c	72 16		 jb	 SHORT $LN41@TW
  04d0e	8b ff		 npad	 2
$LL30@TW:
  04d10	8b 16		 mov	 edx, DWORD PTR [esi]
  04d12	3b 11		 cmp	 edx, DWORD PTR [ecx]
  04d14	75 42		 jne	 SHORT $LN56@TW
  04d16	83 e8 04	 sub	 eax, 4
  04d19	83 c1 04	 add	 ecx, 4
  04d1c	83 c6 04	 add	 esi, 4
  04d1f	83 f8 04	 cmp	 eax, 4
  04d22	73 ec		 jae	 SHORT $LL30@TW
$LN41@TW:
  04d24	85 c0		 test	 eax, eax
  04d26	0f 84 de 00 00
	00		 je	 $LN57@TW
  04d2c	8a 11		 mov	 dl, BYTE PTR [ecx]
  04d2e	3a 16		 cmp	 dl, BYTE PTR [esi]
  04d30	75 26		 jne	 SHORT $LN56@TW
  04d32	83 f8 01	 cmp	 eax, 1
  04d35	0f 86 cf 00 00
	00		 jbe	 $LN57@TW
  04d3b	8a 51 01	 mov	 dl, BYTE PTR [ecx+1]
  04d3e	3a 56 01	 cmp	 dl, BYTE PTR [esi+1]
  04d41	75 15		 jne	 SHORT $LN56@TW
  04d43	83 f8 02	 cmp	 eax, 2
  04d46	0f 86 be 00 00
	00		 jbe	 $LN57@TW
  04d4c	8a 41 02	 mov	 al, BYTE PTR [ecx+2]
  04d4f	3a 46 02	 cmp	 al, BYTE PTR [esi+2]
  04d52	0f 84 b2 00 00
	00		 je	 $LN57@TW
$LN56@TW:

; 10023:       }
; 10024:    }
; 10025:    else {
; 10026:       per = MAX(ell + 1, m - ell - 1) + 1;

  04d58	8b c5		 mov	 eax, ebp
  04d5a	2b c3		 sub	 eax, ebx
  04d5c	48		 dec	 eax
  04d5d	8d 4b 01	 lea	 ecx, DWORD PTR [ebx+1]
  04d60	3b c8		 cmp	 ecx, eax
  04d62	7e 02		 jle	 SHORT $LN27@TW
  04d64	8b c1		 mov	 eax, ecx
$LN27@TW:

; 10027:       j = 0;
; 10028:       while (j <= n - m) {

  04d66	8b 7c 24 2c	 mov	 edi, DWORD PTR _n$[esp+28]
  04d6a	40		 inc	 eax
  04d6b	33 f6		 xor	 esi, esi
  04d6d	2b fd		 sub	 edi, ebp
  04d6f	89 44 24 18	 mov	 DWORD PTR _per$[esp+32], eax
  04d73	0f 88 22 01 00
	00		 js	 $LN18@TW
  04d79	8b 54 24 24	 mov	 edx, DWORD PTR _y$[esp+28]
  04d7d	8d 49 00	 npad	 3
$LL9@TW:

; 10029:          i = ell + 1;

  04d80	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]

; 10030:          while (i < m && x[i] == y[i + j])

  04d83	3b c5		 cmp	 eax, ebp
  04d85	7d 24		 jge	 SHORT $LN52@TW
  04d87	8d 0c 16	 lea	 ecx, DWORD PTR [esi+edx]
  04d8a	8d 9b 00 00 00
	00		 npad	 6
$LL7@TW:
  04d90	8b 5c 24 28	 mov	 ebx, DWORD PTR _x$[esp+28]
  04d94	8a 1c 18	 mov	 bl, BYTE PTR [eax+ebx]
  04d97	3a 1c 01	 cmp	 bl, BYTE PTR [ecx+eax]
  04d9a	75 07		 jne	 SHORT $LN6@TW

; 10031:             ++i;

  04d9c	40		 inc	 eax
  04d9d	3b c5		 cmp	 eax, ebp
  04d9f	7c ef		 jl	 SHORT $LL7@TW

; 10032:          if (i >= m) {

  04da1	eb 04		 jmp	 SHORT $LN64@TW
$LN6@TW:
  04da3	3b c5		 cmp	 eax, ebp
  04da5	7c 4a		 jl	 SHORT $LN5@TW
$LN64@TW:
  04da7	8b 5c 24 10	 mov	 ebx, DWORD PTR _ell$[esp+32]
$LN52@TW:

; 10033:             i = ell;

  04dab	8b c3		 mov	 eax, ebx

; 10034:             while (i >= 0 && x[i] == y[i + j])

  04dad	85 db		 test	 ebx, ebx
  04daf	78 2a		 js	 SHORT $LN51@TW
  04db1	8d 0c 16	 lea	 ecx, DWORD PTR [esi+edx]
$LL4@TW:
  04db4	8b 5c 24 28	 mov	 ebx, DWORD PTR _x$[esp+28]
  04db8	8a 1c 18	 mov	 bl, BYTE PTR [eax+ebx]
  04dbb	3a 1c 01	 cmp	 bl, BYTE PTR [ecx+eax]
  04dbe	75 13		 jne	 SHORT $LN3@TW

; 10035:                --i;

  04dc0	48		 dec	 eax

; 10034:             while (i >= 0 && x[i] == y[i + j])

  04dc1	79 f1		 jns	 SHORT $LL4@TW

; 10036:             if (i < 0) Railgunhits++; //return (y+j);

  04dc3	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
  04dc9	8b 5c 24 10	 mov	 ebx, DWORD PTR _ell$[esp+32]

; 10037:                //OUTPUT(j);
; 10038:             j += per;

  04dcd	03 74 24 18	 add	 esi, DWORD PTR _per$[esp+32]

; 10039:          }
; 10040:          else

  04dd1	eb 26		 jmp	 SHORT $LN1@TW
$LN3@TW:

; 10036:             if (i < 0) Railgunhits++; //return (y+j);

  04dd3	85 c0		 test	 eax, eax
  04dd5	79 10		 jns	 SHORT $LN55@TW
  04dd7	8b 5c 24 10	 mov	 ebx, DWORD PTR _ell$[esp+32]
$LN51@TW:
  04ddb	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 10037:                //OUTPUT(j);
; 10038:             j += per;

  04de1	03 74 24 18	 add	 esi, DWORD PTR _per$[esp+32]

; 10039:          }
; 10040:          else

  04de5	eb 12		 jmp	 SHORT $LN1@TW
$LN55@TW:

; 10036:             if (i < 0) Railgunhits++; //return (y+j);

  04de7	8b 5c 24 10	 mov	 ebx, DWORD PTR _ell$[esp+32]

; 10037:                //OUTPUT(j);
; 10038:             j += per;

  04deb	03 74 24 18	 add	 esi, DWORD PTR _per$[esp+32]

; 10039:          }
; 10040:          else

  04def	eb 08		 jmp	 SHORT $LN1@TW
$LN5@TW:

; 10041:             j += (i - ell);

  04df1	8b 5c 24 10	 mov	 ebx, DWORD PTR _ell$[esp+32]
  04df5	2b c3		 sub	 eax, ebx
  04df7	03 f0		 add	 esi, eax
$LN1@TW:

; 10042: AdvanceHopperGrass++;

  04df9	ff 44 24 14	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+32]
  04dfd	3b f7		 cmp	 esi, edi
  04dff	0f 8e 7b ff ff
	ff		 jle	 $LL9@TW

; 9999 :    }
; 10000: 
; 10001:    /* Searching */
; 10002:    if (memcmp(x, x + per, ell + 1) == 0) {

  04e05	e9 91 00 00 00	 jmp	 $LN18@TW
$LN57@TW:

; 10003:       j = 0;
; 10004:       memory = -1;
; 10005:       while (j <= n - m) {

  04e0a	8b 44 24 2c	 mov	 eax, DWORD PTR _n$[esp+28]
  04e0e	33 ff		 xor	 edi, edi
  04e10	83 c9 ff	 or	 ecx, -1
  04e13	2b c5		 sub	 eax, ebp
  04e15	89 44 24 1c	 mov	 DWORD PTR tv327[esp+32], eax
  04e19	0f 88 7c 00 00
	00		 js	 $LN18@TW
  04e1f	90		 npad	 1
$LL19@TW:

; 10006:          i = MAX(ell, memory) + 1;

  04e20	8b c3		 mov	 eax, ebx
  04e22	3b d9		 cmp	 ebx, ecx
  04e24	7f 02		 jg	 SHORT $LN26@TW
  04e26	8b c1		 mov	 eax, ecx
$LN26@TW:
  04e28	40		 inc	 eax

; 10007:          while (i < m && x[i] == y[i + j])

  04e29	3b c5		 cmp	 eax, ebp
  04e2b	7d 1e		 jge	 SHORT $LN50@TW
  04e2d	8b 54 24 24	 mov	 edx, DWORD PTR _y$[esp+28]
  04e31	8d 34 17	 lea	 esi, DWORD PTR [edi+edx]
$LL17@TW:
  04e34	8b 54 24 28	 mov	 edx, DWORD PTR _x$[esp+28]
  04e38	8a 14 10	 mov	 dl, BYTE PTR [eax+edx]
  04e3b	3a 14 06	 cmp	 dl, BYTE PTR [esi+eax]
  04e3e	75 07		 jne	 SHORT $LN16@TW

; 10008:             ++i;

  04e40	40		 inc	 eax
  04e41	3b c5		 cmp	 eax, ebp
  04e43	7c ef		 jl	 SHORT $LL17@TW

; 10009:          if (i >= m) {

  04e45	eb 04		 jmp	 SHORT $LN50@TW
$LN16@TW:
  04e47	3b c5		 cmp	 eax, ebp
  04e49	7c 3f		 jl	 SHORT $LN15@TW
$LN50@TW:

; 10010:             i = ell;

  04e4b	8b c3		 mov	 eax, ebx

; 10011:             while (i > memory && x[i] == y[i + j])

  04e4d	3b d9		 cmp	 ebx, ecx
  04e4f	7e 26		 jle	 SHORT $LN49@TW
  04e51	8b 54 24 24	 mov	 edx, DWORD PTR _y$[esp+28]
  04e55	8d 34 17	 lea	 esi, DWORD PTR [edi+edx]
  04e58	eb 06 8d 9b 00
	00 00 00	 npad	 8
$LL14@TW:
  04e60	8b 54 24 28	 mov	 edx, DWORD PTR _x$[esp+28]
  04e64	8a 14 10	 mov	 dl, BYTE PTR [eax+edx]
  04e67	3a 14 06	 cmp	 dl, BYTE PTR [esi+eax]
  04e6a	75 07		 jne	 SHORT $LN13@TW

; 10012:                --i;

  04e6c	48		 dec	 eax
  04e6d	3b c1		 cmp	 eax, ecx
  04e6f	7f ef		 jg	 SHORT $LL14@TW

; 10013:             if (i <= memory) Railgunhits++; //return (y+j);

  04e71	eb 04		 jmp	 SHORT $LN49@TW
$LN13@TW:
  04e73	3b c1		 cmp	 eax, ecx
  04e75	7f 06		 jg	 SHORT $LN60@TW
$LN49@TW:
  04e77	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN60@TW:

; 10014:                //OUTPUT(j);
; 10015:             j += per;

  04e7d	8b 44 24 18	 mov	 eax, DWORD PTR _per$[esp+32]

; 10016:             memory = m - per - 1;

  04e81	8b cd		 mov	 ecx, ebp
  04e83	2b c8		 sub	 ecx, eax
  04e85	03 f8		 add	 edi, eax
  04e87	49		 dec	 ecx

; 10017:          }
; 10018:          else {

  04e88	eb 07		 jmp	 SHORT $LN11@TW
$LN15@TW:

; 10019:             j += (i - ell);

  04e8a	2b c3		 sub	 eax, ebx
  04e8c	03 f8		 add	 edi, eax

; 10020:             memory = -1;

  04e8e	83 c9 ff	 or	 ecx, -1
$LN11@TW:

; 10021:          }
; 10022: AdvanceHopperGrass++;

  04e91	ff 44 24 14	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+32]
  04e95	3b 7c 24 1c	 cmp	 edi, DWORD PTR tv327[esp+32]
  04e99	7e 85		 jle	 SHORT $LL19@TW
$LN18@TW:

; 10043:       }
; 10044:    }
; 10045: 
; 10046: GlobalSP += (int)((double)n/AdvanceHopperGrass*100);

  04e9b	8b 74 24 14	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+32]
  04e9f	db 44 24 2c	 fild	 DWORD PTR _n$[esp+28]
  04ea3	8b c6		 mov	 eax, esi
  04ea5	89 44 24 28	 mov	 DWORD PTR tv586[esp+28], eax
  04ea9	db 44 24 28	 fild	 DWORD PTR tv586[esp+28]
  04ead	85 c0		 test	 eax, eax
  04eaf	79 06		 jns	 SHORT $LN62@TW
  04eb1	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN62@TW:
  04eb7	de f9		 fdivp	 ST(1), ST(0)
  04eb9	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  04ebf	e8 00 00 00 00	 call	 __ftol2_sse
  04ec4	8b c8		 mov	 ecx, eax
  04ec6	99		 cdq
  04ec7	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 10047: GlobalI += AdvanceHopperGrass;
; 10048: printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)n/AdvanceHopperGrass*100), AdvanceHopperGrass);

  04ecd	56		 push	 esi
  04ece	51		 push	 ecx
  04ecf	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  04ed5	01 35 00 00 00
	00		 add	 DWORD PTR _GlobalI, esi
  04edb	68 00 00 00 00	 push	 OFFSET $SG7785
  04ee0	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  04ee7	e8 00 00 00 00	 call	 _printf
  04eec	83 c4 0c	 add	 esp, 12			; 0000000cH
  04eef	5f		 pop	 edi
  04ef0	5e		 pop	 esi
  04ef1	5d		 pop	 ebp
  04ef2	5b		 pop	 ebx

; 10049: 
; 10050: }

  04ef3	83 c4 10	 add	 esp, 16			; 00000010H
  04ef6	c3		 ret	 0
_TW	ENDP
_TEXT	ENDS
PUBLIC	_preBmBc
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_x$ = 8							; size = 4
_m$ = 12						; size = 4
_bmBc$ = 16						; size = 4
_preBmBc PROC

; 10054:    int i;
; 10055:  
; 10056:    for (i = 0; i < ASIZE; ++i)
; 10057:       bmBc[i] = m;

  04f00	8b 44 24 08	 mov	 eax, DWORD PTR _m$[esp-4]
  04f04	56		 push	 esi
  04f05	8b 74 24 10	 mov	 esi, DWORD PTR _bmBc$[esp]
  04f09	57		 push	 edi
  04f0a	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  04f0f	8b fe		 mov	 edi, esi
  04f11	f3 ab		 rep stosd

; 10058:    for (i = 0; i < m - 1; ++i)

  04f13	8d 50 ff	 lea	 edx, DWORD PTR [eax-1]
  04f16	33 c9		 xor	 ecx, ecx
  04f18	85 d2		 test	 edx, edx
  04f1a	7e 15		 jle	 SHORT $LN1@preBmBc
  04f1c	8b 7c 24 0c	 mov	 edi, DWORD PTR _x$[esp+4]
  04f20	8b c2		 mov	 eax, edx
  04f22	53		 push	 ebx
$LL3@preBmBc:

; 10059:       bmBc[x[i]] = m - i - 1;

  04f23	0f be 1c 39	 movsx	 ebx, BYTE PTR [ecx+edi]
  04f27	89 04 9e	 mov	 DWORD PTR [esi+ebx*4], eax
  04f2a	41		 inc	 ecx
  04f2b	48		 dec	 eax
  04f2c	3b ca		 cmp	 ecx, edx
  04f2e	7c f3		 jl	 SHORT $LL3@preBmBc
  04f30	5b		 pop	 ebx
$LN1@preBmBc:
  04f31	5f		 pop	 edi
  04f32	5e		 pop	 esi

; 10060: }

  04f33	c3		 ret	 0
_preBmBc ENDP
_TEXT	ENDS
PUBLIC	_suffixes
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_x$ = 8							; size = 4
_f$ = 12						; size = 4
_m$ = 12						; size = 4
_suff$ = 16						; size = 4
_suffixes PROC

; 10063: void suffixes(char *x, int m, int *suff) {

  04f40	55		 push	 ebp

; 10064:    int f, g, i;
; 10065:  
; 10066:    suff[m - 1] = m;

  04f41	8b 6c 24 10	 mov	 ebp, DWORD PTR _suff$[esp]
  04f45	57		 push	 edi
  04f46	8b 7c 24 10	 mov	 edi, DWORD PTR _m$[esp+4]

; 10067:    g = m - 1;
; 10068:    for (i = m - 2; i >= 0; --i) {

  04f4a	8d 4f fe	 lea	 ecx, DWORD PTR [edi-2]
  04f4d	89 7c bd fc	 mov	 DWORD PTR [ebp+edi*4-4], edi
  04f51	8d 47 ff	 lea	 eax, DWORD PTR [edi-1]
  04f54	85 c9		 test	 ecx, ecx
  04f56	78 54		 js	 SHORT $LN6@suffixes
  04f58	53		 push	 ebx
  04f59	8b 5c 24 14	 mov	 ebx, DWORD PTR _f$[esp+8]
  04f5d	56		 push	 esi
  04f5e	8b ff		 npad	 2
$LL8@suffixes:

; 10069:       if (i > g && suff[i + m - 1 - f] < i - g)

  04f60	3b c8		 cmp	 ecx, eax
  04f62	7e 14		 jle	 SHORT $LN18@suffixes
  04f64	8b d1		 mov	 edx, ecx
  04f66	2b d3		 sub	 edx, ebx
  04f68	03 d7		 add	 edx, edi
  04f6a	8b 54 95 fc	 mov	 edx, DWORD PTR [ebp+edx*4-4]
  04f6e	8b f1		 mov	 esi, ecx
  04f70	2b f0		 sub	 esi, eax
  04f72	3b d6		 cmp	 edx, esi

; 10070:          suff[i] = suff[i + m - 1 - f];
; 10071:       else {

  04f74	7c 2d		 jl	 SHORT $LN19@suffixes

; 10072:          if (i < g)

  04f76	3b c8		 cmp	 ecx, eax
$LN18@suffixes:
  04f78	7d 02		 jge	 SHORT $LN3@suffixes

; 10073:             g = i;

  04f7a	8b c1		 mov	 eax, ecx
$LN3@suffixes:

; 10074:          f = i;

  04f7c	8b d9		 mov	 ebx, ecx

; 10075:          while (g >= 0 && x[g] == x[g + m - 1 - f])

  04f7e	85 c0		 test	 eax, eax
  04f80	78 1d		 js	 SHORT $LN17@suffixes

; 10074:          f = i;

  04f82	8b d0		 mov	 edx, eax
  04f84	2b d1		 sub	 edx, ecx
  04f86	03 54 24 14	 add	 edx, DWORD PTR _x$[esp+12]
  04f8a	8d 74 3a ff	 lea	 esi, DWORD PTR [edx+edi-1]
  04f8e	8b ff		 npad	 2
$LL2@suffixes:

; 10075:          while (g >= 0 && x[g] == x[g + m - 1 - f])

  04f90	8b 54 24 14	 mov	 edx, DWORD PTR _x$[esp+12]
  04f94	8a 14 10	 mov	 dl, BYTE PTR [eax+edx]
  04f97	3a 16		 cmp	 dl, BYTE PTR [esi]
  04f99	75 04		 jne	 SHORT $LN17@suffixes

; 10076:             --g;

  04f9b	4e		 dec	 esi
  04f9c	48		 dec	 eax
  04f9d	79 f1		 jns	 SHORT $LL2@suffixes
$LN17@suffixes:

; 10077:          suff[i] = f - g;

  04f9f	8b d1		 mov	 edx, ecx
  04fa1	2b d0		 sub	 edx, eax
$LN19@suffixes:
  04fa3	49		 dec	 ecx
  04fa4	89 54 8d 04	 mov	 DWORD PTR [ebp+ecx*4+4], edx
  04fa8	79 b6		 jns	 SHORT $LL8@suffixes
  04faa	5e		 pop	 esi
  04fab	5b		 pop	 ebx
$LN6@suffixes:
  04fac	5f		 pop	 edi
  04fad	5d		 pop	 ebp

; 10078:       }
; 10079:    }
; 10080: }

  04fae	c3		 ret	 0
_suffixes ENDP
_TEXT	ENDS
PUBLIC	__$ArrayPad$
PUBLIC	_preBmGs
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_suff$ = -1540						; size = 1536
__$ArrayPad$ = -4					; size = 4
_x$ = 8							; size = 4
_m$ = 12						; size = 4
_bmGs$ = 16						; size = 4
_preBmGs PROC

; 10082: void preBmGs(char *x, int m, int bmGs[]) {

  04fb0	81 ec 04 06 00
	00		 sub	 esp, 1540		; 00000604H
  04fb6	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  04fbb	33 c4		 xor	 eax, esp
  04fbd	89 84 24 00 06
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+1540], eax
  04fc4	8b 84 24 08 06
	00 00		 mov	 eax, DWORD PTR _x$[esp+1536]
  04fcb	53		 push	 ebx
  04fcc	8b 9c 24 14 06
	00 00		 mov	 ebx, DWORD PTR _bmGs$[esp+1540]
  04fd3	55		 push	 ebp
  04fd4	56		 push	 esi
  04fd5	8b b4 24 18 06
	00 00		 mov	 esi, DWORD PTR _m$[esp+1548]
  04fdc	57		 push	 edi

; 10083:    int i, j, suff[XSIZE];
; 10084:  
; 10085:    suffixes(x, m, suff);

  04fdd	8d 4c 24 10	 lea	 ecx, DWORD PTR _suff$[esp+1556]
  04fe1	51		 push	 ecx
  04fe2	56		 push	 esi
  04fe3	50		 push	 eax
  04fe4	e8 00 00 00 00	 call	 _suffixes
  04fe9	83 c4 0c	 add	 esp, 12			; 0000000cH

; 10086:  
; 10087:    for (i = 0; i < m; ++i)

  04fec	85 f6		 test	 esi, esi
  04fee	7e 08		 jle	 SHORT $LN14@preBmGs

; 10088:       bmGs[i] = m;

  04ff0	8b ce		 mov	 ecx, esi
  04ff2	8b c6		 mov	 eax, esi
  04ff4	8b fb		 mov	 edi, ebx
  04ff6	f3 ab		 rep stosd
$LN14@preBmGs:

; 10090:    for (i = m - 1; i >= 0; --i)

  04ff8	8d 56 ff	 lea	 edx, DWORD PTR [esi-1]
  04ffb	33 c0		 xor	 eax, eax
  04ffd	85 d2		 test	 edx, edx
  04fff	78 31		 js	 SHORT $LN9@preBmGs

; 10089:    j = 0;

  05001	8b ce		 mov	 ecx, esi
  05003	2b ca		 sub	 ecx, edx
  05005	8d 7a 01	 lea	 edi, DWORD PTR [edx+1]
  05008	49		 dec	 ecx
  05009	8d a4 24 00 00
	00 00		 npad	 7
$LL11@preBmGs:

; 10091:       if (suff[i] == i + 1)

  05010	39 7c 94 10	 cmp	 DWORD PTR _suff$[esp+edx*4+1556], edi
  05014	75 17		 jne	 SHORT $LN10@preBmGs

; 10092:          for (; j < m - 1 - i; ++j)

  05016	3b c1		 cmp	 eax, ecx
  05018	7d 13		 jge	 SHORT $LN10@preBmGs
  0501a	8d 9b 00 00 00
	00		 npad	 6
$LL7@preBmGs:

; 10093:             if (bmGs[j] == m)

  05020	39 34 83	 cmp	 DWORD PTR [ebx+eax*4], esi
  05023	75 03		 jne	 SHORT $LN6@preBmGs

; 10094:                bmGs[j] = m - 1 - i;

  05025	89 0c 83	 mov	 DWORD PTR [ebx+eax*4], ecx
$LN6@preBmGs:

; 10092:          for (; j < m - 1 - i; ++j)

  05028	40		 inc	 eax
  05029	3b c1		 cmp	 eax, ecx
  0502b	7c f3		 jl	 SHORT $LL7@preBmGs
$LN10@preBmGs:

; 10090:    for (i = m - 1; i >= 0; --i)

  0502d	4f		 dec	 edi
  0502e	41		 inc	 ecx
  0502f	4a		 dec	 edx
  05030	79 de		 jns	 SHORT $LL11@preBmGs
$LN9@preBmGs:

; 10095:    for (i = 0; i <= m - 2; ++i)

  05032	8d 56 fe	 lea	 edx, DWORD PTR [esi-2]
  05035	33 c0		 xor	 eax, eax
  05037	85 d2		 test	 edx, edx
  05039	78 15		 js	 SHORT $LN1@preBmGs
  0503b	8d 4e ff	 lea	 ecx, DWORD PTR [esi-1]
  0503e	8b ff		 npad	 2
$LL3@preBmGs:

; 10096:       bmGs[m - 1 - suff[i]] = m - 1 - i;

  05040	8b fe		 mov	 edi, esi
  05042	2b 7c 84 10	 sub	 edi, DWORD PTR _suff$[esp+eax*4+1556]
  05046	40		 inc	 eax
  05047	89 4c bb fc	 mov	 DWORD PTR [ebx+edi*4-4], ecx
  0504b	49		 dec	 ecx
  0504c	3b c2		 cmp	 eax, edx
  0504e	7e f0		 jle	 SHORT $LL3@preBmGs
$LN1@preBmGs:

; 10097: }

  05050	8b 8c 24 10 06
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+1556]
  05057	5f		 pop	 edi
  05058	5e		 pop	 esi
  05059	5d		 pop	 ebp
  0505a	5b		 pop	 ebx
  0505b	33 cc		 xor	 ecx, esp
  0505d	e8 00 00 00 00	 call	 @__security_check_cookie@4
  05062	81 c4 04 06 00
	00		 add	 esp, 1540		; 00000604H
  05068	c3		 ret	 0
_preBmGs ENDP
_TEXT	ENDS
PUBLIC	__$ArrayPad$
PUBLIC	_BM
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_AdvanceHopperGrass$ = -2576				; size = 4
tv396 = -2572						; size = 4
$T10871 = -2572						; size = 4
_bmBc$ = -2568						; size = 1024
_bmGs$ = -1544						; size = 1536
__$ArrayPad$ = -4					; size = 4
_y$ = 8							; size = 4
_x$ = 12						; size = 4
_n$ = 16						; size = 4
_m$ = 20						; size = 4
_BM	PROC

; 10101: char * BM(char *y, char *x, int n, int m ) {

  05070	55		 push	 ebp
  05071	8b ec		 mov	 ebp, esp
  05073	83 e4 f8	 and	 esp, -8			; fffffff8H
  05076	81 ec 14 0a 00
	00		 sub	 esp, 2580		; 00000a14H
  0507c	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  05081	33 c4		 xor	 eax, esp
  05083	89 84 24 10 0a
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+2580], eax
  0508a	53		 push	 ebx
  0508b	8b 5d 0c	 mov	 ebx, DWORD PTR _x$[ebp]
  0508e	56		 push	 esi

; 10102: 
; 10103:    int i, j, bmGs[XSIZE], bmBc[ASIZE];
; 10104:    unsigned long  AdvanceHopperGrass=0;
; 10105:  
; 10106:    /* Preprocessing */
; 10107:    preBmGs(x, m, bmGs);

  0508f	8b 75 14	 mov	 esi, DWORD PTR _m$[ebp]
  05092	57		 push	 edi
  05093	8d 84 24 18 04
	00 00		 lea	 eax, DWORD PTR _bmGs$[esp+2592]
  0509a	50		 push	 eax
  0509b	56		 push	 esi
  0509c	53		 push	 ebx
  0509d	c7 44 24 1c 00
	00 00 00	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2604], 0
  050a5	e8 00 00 00 00	 call	 _preBmGs

; 10108:    preBmBc(x, m, bmBc);

  050aa	8b c6		 mov	 eax, esi
  050ac	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  050b1	8d 7c 24 24	 lea	 edi, DWORD PTR _bmBc$[esp+2604]
  050b5	f3 ab		 rep stosd
  050b7	8d 7e ff	 lea	 edi, DWORD PTR [esi-1]
  050ba	83 c4 0c	 add	 esp, 12			; 0000000cH
  050bd	33 c0		 xor	 eax, eax
  050bf	85 ff		 test	 edi, edi
  050c1	7e 10		 jle	 SHORT $LN12@BM
  050c3	8b cf		 mov	 ecx, edi
$LL14@BM:
  050c5	0f be 14 18	 movsx	 edx, BYTE PTR [eax+ebx]
  050c9	89 4c 94 18	 mov	 DWORD PTR _bmBc$[esp+edx*4+2592], ecx
  050cd	40		 inc	 eax
  050ce	49		 dec	 ecx
  050cf	3b c7		 cmp	 eax, edi
  050d1	7c f2		 jl	 SHORT $LL14@BM
$LN12@BM:

; 10109:  
; 10110:    /* Searching */
; 10111:    j = 0;
; 10112:    while (j <= n - m) {

  050d3	8b 45 10	 mov	 eax, DWORD PTR _n$[ebp]
  050d6	33 d2		 xor	 edx, edx
  050d8	2b c6		 sub	 eax, esi
  050da	89 44 24 14	 mov	 DWORD PTR $T10871[esp+2592], eax
  050de	78 6b		 js	 SHORT $LN6@BM
$LL7@BM:

; 10113:       for (i = m - 1; i >= 0 && x[i] == y[i + j]; --i);

  050e0	8b c7		 mov	 eax, edi
  050e2	85 c0		 test	 eax, eax
  050e4	78 28		 js	 SHORT $LN28@BM
  050e6	8b 4d 08	 mov	 ecx, DWORD PTR _y$[ebp]
  050e9	8d 34 0a	 lea	 esi, DWORD PTR [edx+ecx]
  050ec	8d 64 24 00	 npad	 4
$LL5@BM:
  050f0	8a 0c 03	 mov	 cl, BYTE PTR [ebx+eax]
  050f3	3a 0c 06	 cmp	 cl, BYTE PTR [esi+eax]
  050f6	75 12		 jne	 SHORT $LN3@BM
  050f8	48		 dec	 eax
  050f9	79 f5		 jns	 SHORT $LL5@BM

; 10115:          Railgunhits++; //return(y+j); //OUTPUT(j);

  050fb	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 10116:          j += bmGs[0];

  05101	03 94 24 18 04
	00 00		 add	 edx, DWORD PTR _bmGs$[esp+2592]

; 10117:       }
; 10118:       else

  05108	eb 37		 jmp	 SHORT $LN1@BM
$LN3@BM:

; 10114:       if (i < 0) {

  0510a	85 c0		 test	 eax, eax
  0510c	79 0f		 jns	 SHORT $LN2@BM
$LN28@BM:

; 10115:          Railgunhits++; //return(y+j); //OUTPUT(j);

  0510e	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits

; 10116:          j += bmGs[0];

  05114	03 94 24 18 04
	00 00		 add	 edx, DWORD PTR _bmGs$[esp+2592]

; 10117:       }
; 10118:       else

  0511b	eb 24		 jmp	 SHORT $LN1@BM
$LN2@BM:

; 10119:          j += MAX(bmGs[i], bmBc[y[i + j]] - m + 1 + i);

  0511d	8b 75 08	 mov	 esi, DWORD PTR _y$[ebp]
  05120	8d 0c 10	 lea	 ecx, DWORD PTR [eax+edx]
  05123	0f be 0c 31	 movsx	 ecx, BYTE PTR [ecx+esi]
  05127	8b 4c 8c 18	 mov	 ecx, DWORD PTR _bmBc$[esp+ecx*4+2592]
  0512b	2b 4d 14	 sub	 ecx, DWORD PTR _m$[ebp]
  0512e	8d 4c 01 01	 lea	 ecx, DWORD PTR [ecx+eax+1]
  05132	8b 84 84 18 04
	00 00		 mov	 eax, DWORD PTR _bmGs$[esp+eax*4+2592]
  05139	3b c1		 cmp	 eax, ecx
  0513b	7f 02		 jg	 SHORT $LN11@BM
  0513d	8b c1		 mov	 eax, ecx
$LN11@BM:
  0513f	03 d0		 add	 edx, eax
$LN1@BM:

; 10120: AdvanceHopperGrass++;

  05141	ff 44 24 10	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+2592]
  05145	3b 54 24 14	 cmp	 edx, DWORD PTR $T10871[esp+2592]
  05149	7e 95		 jle	 SHORT $LL7@BM
$LN6@BM:

; 10121:    }
; 10122: 
; 10123: GlobalSP += (int)((double)n/AdvanceHopperGrass*100);

  0514b	8b 74 24 10	 mov	 esi, DWORD PTR _AdvanceHopperGrass$[esp+2592]
  0514f	db 45 10	 fild	 DWORD PTR _n$[ebp]
  05152	8b d6		 mov	 edx, esi
  05154	89 54 24 14	 mov	 DWORD PTR tv396[esp+2592], edx
  05158	db 44 24 14	 fild	 DWORD PTR tv396[esp+2592]
  0515c	85 d2		 test	 edx, edx
  0515e	79 06		 jns	 SHORT $LN29@BM
  05160	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN29@BM:
  05166	de f9		 fdivp	 ST(1), ST(0)
  05168	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  0516e	e8 00 00 00 00	 call	 __ftol2_sse
  05173	8b c8		 mov	 ecx, eax
  05175	99		 cdq
  05176	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 10124: GlobalI += AdvanceHopperGrass;
; 10125: printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)n/AdvanceHopperGrass*100), AdvanceHopperGrass);

  0517c	56		 push	 esi
  0517d	51		 push	 ecx
  0517e	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  05184	01 35 00 00 00
	00		 add	 DWORD PTR _GlobalI, esi
  0518a	68 00 00 00 00	 push	 OFFSET $SG7873
  0518f	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  05196	e8 00 00 00 00	 call	 _printf

; 10126: 
; 10127: return(NULL);
; 10128: }

  0519b	8b 8c 24 28 0a
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2604]
  051a2	83 c4 0c	 add	 esp, 12			; 0000000cH
  051a5	5f		 pop	 edi
  051a6	5e		 pop	 esi
  051a7	5b		 pop	 ebx
  051a8	33 cc		 xor	 ecx, esp
  051aa	33 c0		 xor	 eax, eax
  051ac	e8 00 00 00 00	 call	 @__security_check_cookie@4
  051b1	8b e5		 mov	 esp, ebp
  051b3	5d		 pop	 ebp
  051b4	c3		 ret	 0
_BM	ENDP
_TEXT	ENDS
PUBLIC	_Brute_Force_Dummy
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_y$ = 8							; size = 4
_x$ = 12						; size = 4
tv234 = 16						; size = 4
_n$ = 16						; size = 4
$T10879 = 20						; size = 4
_m$ = 20						; size = 4
_Brute_Force_Dummy PROC

; 10138:   
; 10139:     /* Searching */
; 10140:     for (i=0; i <= n-m; i++) {

  051c0	8b 44 24 0c	 mov	 eax, DWORD PTR _n$[esp-4]
  051c4	55		 push	 ebp
  051c5	56		 push	 esi
  051c6	8b 74 24 18	 mov	 esi, DWORD PTR _m$[esp+4]
  051ca	57		 push	 edi
  051cb	33 ed		 xor	 ebp, ebp
  051cd	33 ff		 xor	 edi, edi
  051cf	2b c6		 sub	 eax, esi
  051d1	89 44 24 1c	 mov	 DWORD PTR $T10879[esp+8], eax
  051d5	78 3a		 js	 SHORT $LN4@Brute_Forc

; 10136:     long i, j;
; 10137:     unsigned long  AdvanceHopperGrass=0;

  051d7	8b 54 24 14	 mov	 edx, DWORD PTR _x$[esp+8]
  051db	8d 68 01	 lea	 ebp, DWORD PTR [eax+1]
  051de	53		 push	 ebx
  051df	90		 npad	 1
$LL15@Brute_Forc:

; 10141:        j=0;

  051e0	33 c0		 xor	 eax, eax

; 10142:        while (j < m && y[i+j] == x[j]) j++;

  051e2	85 f6		 test	 esi, esi
  051e4	7e 1d		 jle	 SHORT $LN13@Brute_Forc
  051e6	8b 4c 24 14	 mov	 ecx, DWORD PTR _y$[esp+12]
  051ea	03 cf		 add	 ecx, edi
  051ec	8d 64 24 00	 npad	 4
$LL3@Brute_Forc:
  051f0	8a 1c 01	 mov	 bl, BYTE PTR [ecx+eax]
  051f3	3a 1c 10	 cmp	 bl, BYTE PTR [eax+edx]
  051f6	75 07		 jne	 SHORT $LN2@Brute_Forc
  051f8	40		 inc	 eax
  051f9	3b c6		 cmp	 eax, esi
  051fb	7c f3		 jl	 SHORT $LL3@Brute_Forc

; 10143:        if (j >= m) Railgunhits++; //return(y+i);

  051fd	eb 04		 jmp	 SHORT $LN13@Brute_Forc
$LN2@Brute_Forc:
  051ff	3b c6		 cmp	 eax, esi
  05201	7c 06		 jl	 SHORT $LN14@Brute_Forc
$LN13@Brute_Forc:
  05203	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN14@Brute_Forc:

; 10138:   
; 10139:     /* Searching */
; 10140:     for (i=0; i <= n-m; i++) {

  05209	47		 inc	 edi
  0520a	3b 7c 24 20	 cmp	 edi, DWORD PTR $T10879[esp+12]
  0520e	7e d0		 jle	 SHORT $LL15@Brute_Forc
  05210	5b		 pop	 ebx
$LN4@Brute_Forc:

; 10144: AdvanceHopperGrass++;
; 10145:     }
; 10146: 
; 10147: GlobalSP += (int)((double)n/AdvanceHopperGrass*100);

  05211	db 44 24 18	 fild	 DWORD PTR _n$[esp+8]
  05215	8b d5		 mov	 edx, ebp
  05217	89 54 24 18	 mov	 DWORD PTR tv234[esp+8], edx
  0521b	db 44 24 18	 fild	 DWORD PTR tv234[esp+8]
  0521f	85 d2		 test	 edx, edx
  05221	79 06		 jns	 SHORT $LN16@Brute_Forc
  05223	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN16@Brute_Forc:
  05229	de f9		 fdivp	 ST(1), ST(0)
  0522b	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  05231	e8 00 00 00 00	 call	 __ftol2_sse
  05236	8b c8		 mov	 ecx, eax
  05238	99		 cdq
  05239	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 10148: GlobalI += AdvanceHopperGrass;
; 10149: printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)n/AdvanceHopperGrass*100), AdvanceHopperGrass);

  0523f	55		 push	 ebp
  05240	51		 push	 ecx
  05241	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  05247	01 2d 00 00 00
	00		 add	 DWORD PTR _GlobalI, ebp
  0524d	68 00 00 00 00	 push	 OFFSET $SG7899
  05252	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  05259	e8 00 00 00 00	 call	 _printf
  0525e	83 c4 0c	 add	 esp, 12			; 0000000cH
  05261	5f		 pop	 edi
  05262	5e		 pop	 esi

; 10150: 
; 10151:     return(NULL);

  05263	33 c0		 xor	 eax, eax
  05265	5d		 pop	 ebp

; 10152:    }

  05266	c3		 ret	 0
_Brute_Force_Dummy ENDP
_TEXT	ENDS
PUBLIC	_x$GSCopy$
PUBLIC	__$ArrayPad$
PUBLIC	_SMITH_Boyer_Moore
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_AdvanceHopperGrass$ = -2068				; size = 4
tv479 = -2064						; size = 4
$T10905 = -2064						; size = 4
_x$GSCopy$ = -2060					; size = 4
_qs_bc$ = -2056						; size = 1024
_bm_bc$ = -1032						; size = 1024
__$ArrayPad$ = -4					; size = 4
_y$ = 8							; size = 4
_x$ = 12						; size = 4
_n$ = 16						; size = 4
_m$ = 20						; size = 4
_SMITH_Boyer_Moore PROC

; 10174:    {

  05270	55		 push	 ebp
  05271	8b ec		 mov	 ebp, esp
  05273	83 e4 f8	 and	 esp, -8			; fffffff8H
  05276	81 ec 14 08 00
	00		 sub	 esp, 2068		; 00000814H
  0527c	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  05281	33 c4		 xor	 eax, esp
  05283	89 84 24 10 08
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+2068], eax
  0528a	53		 push	 ebx
  0528b	8b 5d 14	 mov	 ebx, DWORD PTR _m$[ebp]
  0528e	56		 push	 esi
  0528f	8b 75 0c	 mov	 esi, DWORD PTR _x$[ebp]
  05292	57		 push	 edi
  05293	8d 43 01	 lea	 eax, DWORD PTR [ebx+1]

; 10175:     long i;
; 10176:     int bm_bc[ASIZE], qs_bc[ASIZE];
; 10177:    unsigned long  AdvanceHopperGrass;
; 10178:    
; 10179:     /* Preprocessing */
; 10180:     for (i=0; i < ASIZE; i++) {
; 10181:        bm_bc[i]=m;
; 10182:        qs_bc[i]=m+1;

  05296	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  0529b	8d 7c 24 18	 lea	 edi, DWORD PTR _qs_bc$[esp+2080]
  0529f	f3 ab		 rep stosd
  052a1	8b c3		 mov	 eax, ebx
  052a3	b9 00 01 00 00	 mov	 ecx, 256		; 00000100H
  052a8	8d bc 24 18 04
	00 00		 lea	 edi, DWORD PTR _bm_bc$[esp+2080]
  052af	f3 ab		 rep stosd

; 10183:     }
; 10184:     for (i=0; i < m-1; ++i) {

  052b1	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]
  052b4	33 c9		 xor	 ecx, ecx

; 10195:        i+=MAX(bm_bc[y[i+m-1]], qs_bc[y[i+m]]);

  052b6	89 74 24 14	 mov	 DWORD PTR _x$GSCopy$[esp+2080], esi
  052ba	85 c0		 test	 eax, eax
  052bc	7e 21		 jle	 SHORT $LN4@SMITH_Boye

; 10183:     }
; 10184:     for (i=0; i < m-1; ++i) {

  052be	8b d3		 mov	 edx, ebx
$LL6@SMITH_Boye:

; 10185:        bm_bc[x[i]]=m-i-1;

  052c0	0f be 04 0e	 movsx	 eax, BYTE PTR [esi+ecx]
  052c4	03 c0		 add	 eax, eax
  052c6	03 c0		 add	 eax, eax
  052c8	8d 7a ff	 lea	 edi, DWORD PTR [edx-1]

; 10186:        qs_bc[x[i]]=m-i;

  052cb	89 54 04 18	 mov	 DWORD PTR _qs_bc$[esp+eax+2080], edx
  052cf	89 bc 04 18 04
	00 00		 mov	 DWORD PTR _bm_bc$[esp+eax+2080], edi
  052d6	41		 inc	 ecx
  052d7	8d 43 ff	 lea	 eax, DWORD PTR [ebx-1]
  052da	4a		 dec	 edx
  052db	3b c8		 cmp	 ecx, eax
  052dd	7c e1		 jl	 SHORT $LL6@SMITH_Boye
$LN4@SMITH_Boye:

; 10187:     }
; 10188:     qs_bc[x[m-1]]=1;

  052df	0f be 44 33 ff	 movsx	 eax, BYTE PTR [ebx+esi-1]
  052e4	c7 44 84 18 01
	00 00 00	 mov	 DWORD PTR _qs_bc$[esp+eax*4+2080], 1

; 10189: 
; 10190: AdvanceHopperGrass=0;   
; 10191:     /* Searching */
; 10192:     i=0;
; 10193:     while (i <= n-m) {

  052ec	8b 45 10	 mov	 eax, DWORD PTR _n$[ebp]
  052ef	33 ff		 xor	 edi, edi
  052f1	2b c3		 sub	 eax, ebx
  052f3	89 7c 24 0c	 mov	 DWORD PTR _AdvanceHopperGrass$[esp+2080], edi
  052f7	89 44 24 10	 mov	 DWORD PTR $T10905[esp+2080], eax
  052fb	78 7f		 js	 SHORT $LN2@SMITH_Boye
  052fd	8b 55 08	 mov	 edx, DWORD PTR _y$[ebp]
  05300	eb 04		 jmp	 SHORT $LN3@SMITH_Boye
$LL28@SMITH_Boye:
  05302	8b 74 24 14	 mov	 esi, DWORD PTR _x$GSCopy$[esp+2080]
$LN3@SMITH_Boye:

; 10194:        if (memcmp(&y[i], x, m) == 0) Railgunhits++; //return(i);

  05306	8b ce		 mov	 ecx, esi
  05308	8b c3		 mov	 eax, ebx
  0530a	8d 34 17	 lea	 esi, DWORD PTR [edi+edx]
  0530d	83 fb 04	 cmp	 ebx, 4
  05310	72 14		 jb	 SHORT $LN23@SMITH_Boye
$LL15@SMITH_Boye:
  05312	8b 16		 mov	 edx, DWORD PTR [esi]
  05314	3b 11		 cmp	 edx, DWORD PTR [ecx]
  05316	75 38		 jne	 SHORT $LN1@SMITH_Boye
  05318	83 e8 04	 sub	 eax, 4
  0531b	83 c1 04	 add	 ecx, 4
  0531e	83 c6 04	 add	 esi, 4
  05321	83 f8 04	 cmp	 eax, 4
  05324	73 ec		 jae	 SHORT $LL15@SMITH_Boye
$LN23@SMITH_Boye:
  05326	85 c0		 test	 eax, eax
  05328	74 20		 je	 SHORT $LN17@SMITH_Boye
  0532a	8a 11		 mov	 dl, BYTE PTR [ecx]
  0532c	3a 16		 cmp	 dl, BYTE PTR [esi]
  0532e	75 20		 jne	 SHORT $LN1@SMITH_Boye
  05330	83 f8 01	 cmp	 eax, 1
  05333	76 15		 jbe	 SHORT $LN17@SMITH_Boye
  05335	8a 51 01	 mov	 dl, BYTE PTR [ecx+1]
  05338	3a 56 01	 cmp	 dl, BYTE PTR [esi+1]
  0533b	75 13		 jne	 SHORT $LN1@SMITH_Boye
  0533d	83 f8 02	 cmp	 eax, 2
  05340	76 08		 jbe	 SHORT $LN17@SMITH_Boye
  05342	8a 41 02	 mov	 al, BYTE PTR [ecx+2]
  05345	3a 46 02	 cmp	 al, BYTE PTR [esi+2]
  05348	75 06		 jne	 SHORT $LN1@SMITH_Boye
$LN17@SMITH_Boye:
  0534a	ff 05 00 00 00
	00		 inc	 DWORD PTR _Railgunhits
$LN1@SMITH_Boye:

; 10195:        i+=MAX(bm_bc[y[i+m-1]], qs_bc[y[i+m]]);

  05350	8b 55 08	 mov	 edx, DWORD PTR _y$[ebp]
  05353	8d 04 13	 lea	 eax, DWORD PTR [ebx+edx]
  05356	0f be 4c 38 ff	 movsx	 ecx, BYTE PTR [eax+edi-1]
  0535b	0f be 04 38	 movsx	 eax, BYTE PTR [eax+edi]
  0535f	8b 8c 8c 18 04
	00 00		 mov	 ecx, DWORD PTR _bm_bc$[esp+ecx*4+2080]
  05366	8b 44 84 18	 mov	 eax, DWORD PTR _qs_bc$[esp+eax*4+2080]
  0536a	3b c8		 cmp	 ecx, eax
  0536c	7e 02		 jle	 SHORT $LN12@SMITH_Boye
  0536e	8b c1		 mov	 eax, ecx
$LN12@SMITH_Boye:

; 10196: AdvanceHopperGrass++;

  05370	ff 44 24 0c	 inc	 DWORD PTR _AdvanceHopperGrass$[esp+2080]
  05374	03 f8		 add	 edi, eax
  05376	3b 7c 24 10	 cmp	 edi, DWORD PTR $T10905[esp+2080]
  0537a	7e 86		 jle	 SHORT $LL28@SMITH_Boye
$LN2@SMITH_Boye:

; 10197:     }
; 10198: 
; 10199: GlobalSP += (int)((double)n/AdvanceHopperGrass*100);

  0537c	8b 4c 24 0c	 mov	 ecx, DWORD PTR _AdvanceHopperGrass$[esp+2080]
  05380	db 45 10	 fild	 DWORD PTR _n$[ebp]
  05383	db 44 24 0c	 fild	 DWORD PTR _AdvanceHopperGrass$[esp+2080]
  05387	85 c9		 test	 ecx, ecx
  05389	79 06		 jns	 SHORT $LN31@SMITH_Boye
  0538b	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@41f0000000000000
$LN31@SMITH_Boye:
  05391	de f9		 fdivp	 ST(1), ST(0)
  05393	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@4059000000000000
  05399	e8 00 00 00 00	 call	 __ftol2_sse
  0539e	8b c8		 mov	 ecx, eax
  053a0	99		 cdq
  053a1	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalSP, eax

; 10200: GlobalI += AdvanceHopperGrass;

  053a7	8b 44 24 0c	 mov	 eax, DWORD PTR _AdvanceHopperGrass$[esp+2080]

; 10201: printf("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",(int)((double)n/AdvanceHopperGrass*100), AdvanceHopperGrass);

  053ab	50		 push	 eax
  053ac	11 15 04 00 00
	00		 adc	 DWORD PTR _GlobalSP+4, edx
  053b2	01 05 00 00 00
	00		 add	 DWORD PTR _GlobalI, eax
  053b8	51		 push	 ecx
  053b9	68 00 00 00 00	 push	 OFFSET $SG7929
  053be	83 15 04 00 00
	00 00		 adc	 DWORD PTR _GlobalI+4, 0
  053c5	e8 00 00 00 00	 call	 _printf

; 10202: 
; 10203:     return(NULL);
; 10204:    }

  053ca	8b 8c 24 28 08
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2092]
  053d1	83 c4 0c	 add	 esp, 12			; 0000000cH
  053d4	5f		 pop	 edi
  053d5	5e		 pop	 esi
  053d6	5b		 pop	 ebx
  053d7	33 cc		 xor	 ecx, esp
  053d9	33 c0		 xor	 eax, eax
  053db	e8 00 00 00 00	 call	 @__security_check_cookie@4
  053e0	8b e5		 mov	 esp, ebp
  053e2	5d		 pop	 ebp
  053e3	c3		 ret	 0
_SMITH_Boyer_Moore ENDP
_TEXT	ENDS
PUBLIC	_KarpRabinKaze_BOOSTED
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_ulHashPattern$ = 8					; size = 4
_pbTarget$ = 8						; size = 4
_pbPattern$ = 12					; size = 4
_pbTargetMax$ = 16					; size = 4
_cbTarget$ = 16						; size = 4
_cbPattern$ = 20					; size = 4
_KarpRabinKaze_BOOSTED PROC

; 10221:     char *  pbTargetMax = pbTarget + cbTarget;

  053f0	8b 4c 24 0c	 mov	 ecx, DWORD PTR _cbTarget$[esp-4]
  053f4	8b 44 24 04	 mov	 eax, DWORD PTR _pbTarget$[esp-4]
  053f8	57		 push	 edi

; 10222:     register unsigned long  ulHashPattern;
; 10223:     unsigned long  ulHashTarget;
; 10224: 
; 10225:     if (cbPattern > cbTarget)

  053f9	8b 7c 24 14	 mov	 edi, DWORD PTR _cbPattern$[esp]
  053fd	8d 14 08	 lea	 edx, DWORD PTR [eax+ecx]
  05400	89 54 24 10	 mov	 DWORD PTR _pbTargetMax$[esp], edx
  05404	3b f9		 cmp	 edi, ecx
  05406	76 04		 jbe	 SHORT $LN5@KarpRabinK@2

; 10226:         return(NULL);

  05408	33 c0		 xor	 eax, eax
  0540a	5f		 pop	 edi

; 10243:     }
; 10244: }

  0540b	c3		 ret	 0
$LN5@KarpRabinK@2:
  0540c	55		 push	 ebp
  0540d	56		 push	 esi

; 10227: 
; 10228:         pbTarget = pbTarget+cbPattern;
; 10229:         ulHashPattern = ( (*(char *)(pbPattern))<<8 ) + *(pbPattern+(cbPattern-1));

  0540e	8b 74 24 14	 mov	 esi, DWORD PTR _pbPattern$[esp+8]
  05412	0f be 16	 movsx	 edx, BYTE PTR [esi]
  05415	0f be 4c 3e ff	 movsx	 ecx, BYTE PTR [esi+edi-1]
  0541a	03 c7		 add	 eax, edi
  0541c	c1 e2 08	 shl	 edx, 8
  0541f	03 ca		 add	 ecx, edx
  05421	8b e8		 mov	 ebp, eax
  05423	89 4c 24 10	 mov	 DWORD PTR _ulHashPattern$[esp+8], ecx
  05427	2b ef		 sub	 ebp, edi
  05429	53		 push	 ebx
  0542a	8d 9b 00 00 00
	00		 npad	 6
$LL4@KarpRabinK@2:

; 10230: 
; 10231:     for ( ;; )
; 10232:     {
; 10233:         // Kaze: The idea(FAILED) here is to add an additional(second) layer in order to prevent execution of slower hash calculation(i.e. first layer) which(hash) prevents execution of even slower 'memcmp'.
; 10234:         // The line below gives: 314KB/clock
; 10235:         //if ( *pbPattern == *(char *)(pbTarget-cbPattern) && (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )
; 10236:         // The line below gives: 370KB/clock
; 10237:         if ( (ulHashPattern == ( (*(char *)(pbTarget-cbPattern))<<8 ) + *(pbTarget-1)) && !memcmp(pbPattern, pbTarget-cbPattern, (unsigned int)cbPattern) )

  05430	0f be 5d 00	 movsx	 ebx, BYTE PTR [ebp]
  05434	0f be 54 2f ff	 movsx	 edx, BYTE PTR [edi+ebp-1]
  05439	c1 e3 08	 shl	 ebx, 8
  0543c	03 d3		 add	 edx, ebx
  0543e	3b ca		 cmp	 ecx, edx
  05440	75 4e		 jne	 SHORT $LN20@KarpRabinK@2
  05442	8b cf		 mov	 ecx, edi
  05444	8b d5		 mov	 edx, ebp
  05446	83 ff 04	 cmp	 edi, 4
  05449	72 19		 jb	 SHORT $LN16@KarpRabinK@2
  0544b	eb 03 8d 49 00	 npad	 5
$LL9@KarpRabinK@2:
  05450	8b 1e		 mov	 ebx, DWORD PTR [esi]
  05452	3b 1a		 cmp	 ebx, DWORD PTR [edx]
  05454	75 32		 jne	 SHORT $LN19@KarpRabinK@2
  05456	83 e9 04	 sub	 ecx, 4
  05459	83 c2 04	 add	 edx, 4
  0545c	83 c6 04	 add	 esi, 4
  0545f	83 f9 04	 cmp	 ecx, 4
  05462	73 ec		 jae	 SHORT $LL9@KarpRabinK@2
$LN16@KarpRabinK@2:
  05464	85 c9		 test	 ecx, ecx
  05466	74 37		 je	 SHORT $LN11@KarpRabinK@2
  05468	8a 1a		 mov	 bl, BYTE PTR [edx]
  0546a	3a 1e		 cmp	 bl, BYTE PTR [esi]
  0546c	75 1a		 jne	 SHORT $LN19@KarpRabinK@2
  0546e	83 f9 01	 cmp	 ecx, 1
  05471	76 2c		 jbe	 SHORT $LN11@KarpRabinK@2
  05473	8a 5a 01	 mov	 bl, BYTE PTR [edx+1]
  05476	3a 5e 01	 cmp	 bl, BYTE PTR [esi+1]
  05479	75 0d		 jne	 SHORT $LN19@KarpRabinK@2
  0547b	83 f9 02	 cmp	 ecx, 2
  0547e	76 1f		 jbe	 SHORT $LN11@KarpRabinK@2
  05480	8a 4a 02	 mov	 cl, BYTE PTR [edx+2]
  05483	3a 4e 02	 cmp	 cl, BYTE PTR [esi+2]
  05486	74 17		 je	 SHORT $LN11@KarpRabinK@2
$LN19@KarpRabinK@2:
  05488	8b 74 24 18	 mov	 esi, DWORD PTR _pbPattern$[esp+12]
  0548c	8b 4c 24 14	 mov	 ecx, DWORD PTR _ulHashPattern$[esp+12]
$LN20@KarpRabinK@2:

; 10239: 
; 10240:         pbTarget++;

  05490	40		 inc	 eax
  05491	45		 inc	 ebp

; 10241:         if (pbTarget > pbTargetMax)

  05492	3b 44 24 1c	 cmp	 eax, DWORD PTR _pbTargetMax$[esp+12]
  05496	76 98		 jbe	 SHORT $LL4@KarpRabinK@2

; 10242:             return(NULL);

  05498	5b		 pop	 ebx
  05499	5e		 pop	 esi
  0549a	5d		 pop	 ebp
  0549b	33 c0		 xor	 eax, eax
  0549d	5f		 pop	 edi

; 10243:     }
; 10244: }

  0549e	c3		 ret	 0
$LN11@KarpRabinK@2:
  0549f	5b		 pop	 ebx
  054a0	5e		 pop	 esi
  054a1	5d		 pop	 ebp

; 10238:             return((pbTarget-cbPattern));

  054a2	2b c7		 sub	 eax, edi
  054a4	5f		 pop	 edi

; 10243:     }
; 10244: }

  054a5	c3		 ret	 0
_KarpRabinKaze_BOOSTED ENDP
_TEXT	ENDS
PUBLIC	_strstr_Microsoft
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_str1$ = 8						; size = 4
_str2$ = 12						; size = 4
_strstr_Microsoft PROC

; 10251: {

  054b0	56		 push	 esi

; 10252:         char *cp = (char *) str1;

  054b1	8b 74 24 08	 mov	 esi, DWORD PTR _str1$[esp]
  054b5	57		 push	 edi

; 10253:         char *s1, *s2;
; 10254: 
; 10255:         if ( !*str2 )

  054b6	8b 7c 24 10	 mov	 edi, DWORD PTR _str2$[esp+4]
  054ba	80 3f 00	 cmp	 BYTE PTR [edi], 0
  054bd	8b c6		 mov	 eax, esi

; 10256:             return((char *)str1);

  054bf	74 3d		 je	 SHORT $LN7@strstr_Mic

; 10257: 
; 10258:         while (*cp)

  054c1	8a 16		 mov	 dl, BYTE PTR [esi]
  054c3	53		 push	 ebx
  054c4	84 d2		 test	 dl, dl
  054c6	74 33		 je	 SHORT $LN4@strstr_Mic
  054c8	2b f7		 sub	 esi, edi
  054ca	8d 9b 00 00 00
	00		 npad	 6
$LL5@strstr_Mic:

; 10259:         {
; 10260:                 s1 = cp;
; 10261:                 s2 = (char *) str2;

  054d0	8b cf		 mov	 ecx, edi

; 10262: 
; 10263:                 while ( *s1 && *s2 && !(*s1-*s2) )

  054d2	84 d2		 test	 dl, dl
  054d4	74 17		 je	 SHORT $LN2@strstr_Mic
$LL3@strstr_Mic:
  054d6	8a 11		 mov	 dl, BYTE PTR [ecx]
  054d8	84 d2		 test	 dl, dl
  054da	74 21		 je	 SHORT $LN14@strstr_Mic
  054dc	0f be 1c 0e	 movsx	 ebx, BYTE PTR [esi+ecx]
  054e0	0f be d2	 movsx	 edx, dl
  054e3	2b da		 sub	 ebx, edx
  054e5	75 06		 jne	 SHORT $LN2@strstr_Mic

; 10264:                         s1++, s2++;

  054e7	41		 inc	 ecx
  054e8	38 1c 0e	 cmp	 BYTE PTR [esi+ecx], bl
  054eb	75 e9		 jne	 SHORT $LL3@strstr_Mic
$LN2@strstr_Mic:

; 10265: 
; 10266:                 if (!*s2)

  054ed	80 39 00	 cmp	 BYTE PTR [ecx], 0
  054f0	74 0b		 je	 SHORT $LN14@strstr_Mic

; 10267:                         return(cp);
; 10268: 
; 10269:                 cp++;

  054f2	8a 50 01	 mov	 dl, BYTE PTR [eax+1]
  054f5	40		 inc	 eax
  054f6	46		 inc	 esi
  054f7	84 d2		 test	 dl, dl
  054f9	75 d5		 jne	 SHORT $LL5@strstr_Mic
$LN4@strstr_Mic:

; 10270:         }
; 10271:         return(NULL);

  054fb	33 c0		 xor	 eax, eax
$LN14@strstr_Mic:
  054fd	5b		 pop	 ebx
$LN7@strstr_Mic:
  054fe	5f		 pop	 edi
  054ff	5e		 pop	 esi

; 10272: }

  05500	c3		 ret	 0
_strstr_Microsoft ENDP
_TEXT	ENDS
PUBLIC	_strstr_GNU_C_Library
; Function compile flags: /Ogtpy
_TEXT	SEGMENT
_b$ = 8							; size = 1
_phaystack$ = 8						; size = 4
_c$7988 = 12						; size = 1
_pneedle$ = 12						; size = 4
_strstr_GNU_C_Library PROC

; 10279:   const unsigned char *haystack, *needle;
; 10280:   char b;
; 10281:   const unsigned char *rneedle;
; 10282: 
; 10283:   haystack = (const unsigned char *) phaystack;

  05510	8b 44 24 04	 mov	 eax, DWORD PTR _phaystack$[esp-4]
  05514	53		 push	 ebx
  05515	55		 push	 ebp
  05516	56		 push	 esi

; 10284: 
; 10285:   if ((b = *(needle = (const unsigned char *) pneedle)))

  05517	8b 74 24 14	 mov	 esi, DWORD PTR _pneedle$[esp+8]
  0551b	8a 16		 mov	 dl, BYTE PTR [esi]
  0551d	57		 push	 edi
  0551e	88 54 24 14	 mov	 BYTE PTR _b$[esp+12], dl
  05522	84 d2		 test	 dl, dl
  05524	0f 84 a8 00 00
	00		 je	 $foundneedle$7996

; 10286:     {
; 10287:       char c;
; 10288:       haystack--;		/* possible ANSI violation */

  0552a	48		 dec	 eax
  0552b	eb 03 8d 49 00	 npad	 5
$LL27@strstr_GNU:

; 10289: 
; 10290:       {
; 10291: 	char a;
; 10292: 	do
; 10293: 	  if (!(a = *++haystack))

  05530	8a 48 01	 mov	 cl, BYTE PTR [eax+1]
  05533	40		 inc	 eax
  05534	84 c9		 test	 cl, cl
  05536	0f 84 94 00 00
	00		 je	 $ret0$7994

; 10294: 	    goto ret0;
; 10295: 	while (a != b);

  0553c	3a ca		 cmp	 cl, dl
  0553e	75 f0		 jne	 SHORT $LL27@strstr_GNU

; 10296:       }
; 10297: 
; 10298:       if (!(c = *++needle))

  05540	8a 5e 01	 mov	 bl, BYTE PTR [esi+1]
  05543	88 5c 24 18	 mov	 BYTE PTR _c$7988[esp+12], bl
  05547	84 db		 test	 bl, bl
  05549	0f 84 83 00 00
	00		 je	 $foundneedle$7996

; 10299: 	goto foundneedle;
; 10300:       ++needle;
; 10301:       goto jin;
; 10302: 
; 10303:       for (;;)
; 10304: 	{
; 10305: 	  {
; 10306: 	    char a;
; 10307: 	    if (0)
; 10308: 	    jin:{
; 10309: 		if ((a = *++haystack) == c)

  0554f	8a 48 01	 mov	 cl, BYTE PTR [eax+1]
  05552	40		 inc	 eax
  05553	83 c6 02	 add	 esi, 2
$jin$7997:
  05556	3a cb		 cmp	 cl, bl
  05558	74 26		 je	 SHORT $crest$8004
$LN17@strstr_GNU:

; 10314: 	    do
; 10315: 	      {
; 10316: 		for (; a != b; a = *++haystack)

  0555a	3a ca		 cmp	 cl, dl
  0555c	74 1a		 je	 SHORT $LN16@strstr_GNU
  0555e	8b ff		 npad	 2
$LL14@strstr_GNU:

; 10317: 		  {
; 10318: 		    if (!a)

  05560	84 c9		 test	 cl, cl
  05562	74 6c		 je	 SHORT $ret0$7994

; 10319: 		      goto ret0;
; 10320: 		    if ((a = *++haystack) == b)

  05564	8a 48 01	 mov	 cl, BYTE PTR [eax+1]
  05567	40		 inc	 eax
  05568	3a ca		 cmp	 cl, dl
  0556a	74 0c		 je	 SHORT $LN16@strstr_GNU

; 10321: 		      break;
; 10322: 		    if (!a)

  0556c	84 c9		 test	 cl, cl
  0556e	74 60		 je	 SHORT $ret0$7994

; 10314: 	    do
; 10315: 	      {
; 10316: 		for (; a != b; a = *++haystack)

  05570	8a 48 01	 mov	 cl, BYTE PTR [eax+1]
  05573	40		 inc	 eax
  05574	3a ca		 cmp	 cl, dl
  05576	75 e8		 jne	 SHORT $LL14@strstr_GNU
$LN16@strstr_GNU:

; 10323: 		      goto ret0;
; 10324: 		  }
; 10325: 	      }
; 10326: 	    while ((a = *++haystack) != c);

  05578	8a 48 01	 mov	 cl, BYTE PTR [eax+1]
  0557b	40		 inc	 eax
  0557c	3a cb		 cmp	 cl, bl
  0557e	75 da		 jne	 SHORT $LN17@strstr_GNU
$crest$8004:

; 10327: 	  }
; 10328: 	crest:
; 10329: 	  {
; 10330: 	    char a;
; 10331: 	    {
; 10332: 	      const unsigned char *rhaystack;
; 10333: 	      if (*(rhaystack = haystack-- + 1) == (a = *(rneedle = needle)))

  05580	8a 0e		 mov	 cl, BYTE PTR [esi]
  05582	0f b6 58 01	 movzx	 ebx, BYTE PTR [eax+1]
  05586	8d 50 01	 lea	 edx, DWORD PTR [eax+1]
  05589	0f be e9	 movsx	 ebp, cl
  0558c	48		 dec	 eax
  0558d	8b fe		 mov	 edi, esi
  0558f	3b dd		 cmp	 ebx, ebp
  05591	75 29		 jne	 SHORT $LN5@strstr_GNU
$LL7@strstr_GNU:

; 10334: 		do
; 10335: 		  {
; 10336: 		    if (!a)

  05593	84 c9		 test	 cl, cl
  05595	74 3b		 je	 SHORT $foundneedle$7996

; 10337: 		      goto foundneedle;
; 10338: 		    if (*++rhaystack != (a = *++needle))

  05597	8a 4e 01	 mov	 cl, BYTE PTR [esi+1]
  0559a	0f b6 5a 01	 movzx	 ebx, BYTE PTR [edx+1]
  0559e	42		 inc	 edx
  0559f	0f be e9	 movsx	 ebp, cl
  055a2	3b dd		 cmp	 ebx, ebp
  055a4	75 16		 jne	 SHORT $LN5@strstr_GNU

; 10339: 		      break;
; 10340: 		    if (!a)

  055a6	84 c9		 test	 cl, cl
  055a8	74 28		 je	 SHORT $foundneedle$7996

; 10341: 		      goto foundneedle;
; 10342: 		  }
; 10343: 		while (*++rhaystack == (a = *++needle));

  055aa	8a 4e 02	 mov	 cl, BYTE PTR [esi+2]
  055ad	0f b6 5a 01	 movzx	 ebx, BYTE PTR [edx+1]
  055b1	83 c6 02	 add	 esi, 2
  055b4	42		 inc	 edx
  055b5	0f be e9	 movsx	 ebp, cl
  055b8	3b dd		 cmp	 ebx, ebp
  055ba	74 d7		 je	 SHORT $LL7@strstr_GNU
$LN5@strstr_GNU:

; 10344: 	      needle = rneedle;	/* took the register-poor aproach */

  055bc	8b f7		 mov	 esi, edi

; 10345: 	    }
; 10346: 	    if (!a)

  055be	84 c9		 test	 cl, cl
  055c0	74 10		 je	 SHORT $foundneedle$7996

; 10310: 		  goto crest;
; 10311: 	      }
; 10312: 	    else
; 10313: 	      a = *++haystack;

  055c2	8a 48 01	 mov	 cl, BYTE PTR [eax+1]
  055c5	8a 54 24 14	 mov	 dl, BYTE PTR _b$[esp+12]
  055c9	8a 5c 24 18	 mov	 bl, BYTE PTR _c$7988[esp+12]
  055cd	40		 inc	 eax
  055ce	eb 8a		 jmp	 SHORT $LN17@strstr_GNU
$ret0$7994:

; 10347: 	      break;
; 10348: 	  }
; 10349: 	}
; 10350:     }
; 10351: foundneedle:
; 10352:   return (char *) haystack;
; 10353: ret0:
; 10354:   return 0;

  055d0	33 c0		 xor	 eax, eax
$foundneedle$7996:
  055d2	5f		 pop	 edi
  055d3	5e		 pop	 esi
  055d4	5d		 pop	 ebp
  055d5	5b		 pop	 ebx

; 10355: }

  055d6	c3		 ret	 0
_strstr_GNU_C_Library ENDP
_TEXT	ENDS
PUBLIC	__real@3ff0000000000000
PUBLIC	__$ArrayPad$
PUBLIC	_main
EXTRN	_clock:PROC
EXTRN	_gets:PROC
EXTRN	_fclose:PROC
EXTRN	_fread:PROC
EXTRN	_ftell:PROC
EXTRN	_fseek:PROC
EXTRN	_fopen:PROC
EXTRN	_puts:PROC
EXTRN	_malloc:PROC
;	COMDAT __real@3ff0000000000000
CONST	SEGMENT
__real@3ff0000000000000 DQ 03ff0000000000000r	; 1
; Function compile flags: /Ogtpy
CONST	ENDS
_TEXT	SEGMENT
tv4717 = -2028						; size = 4
tv4697 = -2028						; size = 4
tv4676 = -2028						; size = 4
tv4593 = -2028						; size = 4
tv4573 = -2028						; size = 4
_Patternlen$ = -2028					; size = 4
_Pattern$ = -2024					; size = 2020
__$ArrayPad$ = -4					; size = 4
_argc$ = 8						; size = 4
_argv$ = 12						; size = 4
_main	PROC

; 10360:   {

  055e0	81 ec ec 07 00
	00		 sub	 esp, 2028		; 000007ecH
  055e6	a1 00 00 00 00	 mov	 eax, DWORD PTR ___security_cookie
  055eb	33 c4		 xor	 eax, esp
  055ed	89 84 24 e8 07
	00 00		 mov	 DWORD PTR __$ArrayPad$[esp+2028], eax
  055f4	55		 push	 ebp

; 10361: FILE *fp_inLINE;
; 10362: int Bozan;
; 10363: long ThunderwithL, ThunderwithR;
; 10364: char *Strng;
; 10365: long Strnglen;
; 10366: long StrnglenTRAVERSED;
; 10367: char Pattern[20+2000]; // skillessness=12 human consciousness=19 I should have known=19
; 10368: // In the East, enlightenment is described as a state of ultimate=62
; 10369: int Patternlen;      
; 10370: long LinesEncountered=0;
; 10371: long BruteForceDummyhits=0;
; 10372: long KarpRabinKazehits=0;
; 10373: long KarpRabinKaze_BOOSTEDhits=0;
; 10374: long Karp_Rabin_Kaze_4_OCTETShits=0;
; 10375: long Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 10376: long KarpRabinhits=0;
; 10377: long HORSPOOLhits=0;
; 10378: long HORSPOOL_Kazehits=0;
; 10379: long strstrMicrosofthits=0;
; 10380: long strstrGNUCLibraryhits=0;
; 10381: long Railgun_Quadruplet_6pp_GO=0;
; 10382: long Railgun_Quadruplet_88=0;
; 10383: long BNDM32=0;
; 10384: long Railgun_Quadruplet_6pp_GOtws=0;
; 10385: long Railgun_Quadruplet_6pp_GOtwl=0;
; 10386: 
; 10387: long dummy;
; 10388: unsigned long long ReallyTraversed;
; 10389:       char llTOaDigits[27]; // 9,223,372,036,854,775,807: 1(sign or carry)+19(digits)+1('\0')+6(,)
; 10390: 
; 10391: int i, j;
; 10392: char *DumboBox[8][2] = { "an\0", "to\0",
; 10393:                          "TDK\0", "the\0",
; 10394:                          "fast\0", "easy\0",
; 10395:                          "grmbl\0", "email\0",
; 10396:                          "pasting\0", "amazing\0",
; 10397:                          "underdog\0", "superdog\0",
; 10398:                          "participants\0", "skillessness\0",
; 10399:                          "I should have known\0", "human consciousness\0"
; 10400: };
; 10401: 
; 10402: 
; 10403: char *Dumbino[52] = { 
; 10404: "fast\0",
; 10405: "from\0",
; 10406: "SR71\0",
; 10407: "SONY\0",
; 10408: "Lexx\0",
; 10409: "Rabea\0",
; 10410: "makes\0",
; 10411: "punny\0",
; 10412: "funny\0",
; 10413: "Orion\0",
; 10414: "lemon\0",
; 10415: "Hi-Fi\0",
; 10416: "Tesla\0",
; 10417: "Apache\0",
; 10418: "monkey\0",
; 10419: "ramjet\0",
; 10420: "fallen\0",
; 10421: "Albert\0",
; 10422: "Toshiba\0",
; 10423: "grammar\0",
; 10424: "pharaoh\0",
; 10425: "decades\0",
; 10426: "#define\0",
; 10427: "Delerium\0",
; 10428: "numberly\0",
; 10429: "stellify\0",
; 10430: "elephant\0",
; 10431: "Layalina\0",
; 10432: "Fibonacci\0",
; 10433: "profanism\0",
; 10434: "butterfly\0",
; 10435: "Beth Ditto\0",
; 10436: "Got Nuffin\0",
; 10437: "fly fly fly\0",
; 10438: "quintillion\0",
; 10439: "Sick Of Love\0",
; 10440: "Love Lockdown\0",
; 10441: "Dannii Minogue\0",
; 10442: "299,792,458 m/s\0",
; 10443: "Extreme-Fidelity\0",
; 10444: "I should have known\0",
; 10445: "human consciousness\0",
; 10446: "Truth's your only fear\0",
; 10447: "Never thought I'd do it\0",
; 10448: "innocence over fading fast\0",
; 10449: "I hit the ground runnin' free\0",
; 10450: "I colour out the darkest clouds\0",
; 10451: "But he's looking right through me\0",
; 10452: "I'm living in an age that calls darkness light\0",
; 10453: "Following the wanderings of a dream - a dream that keeps my soul alive\0",
; 10454: "I notice what matters and I got nothing to lose but darkness and shadows\0",
; 10455: "Then, singing among the savage branches, it impales itself upon the longest, sharpest spine. And, dying, it rises above its own agony to outcarol the lark and the nightingale.\0"
; 10456: };
; 10457: 
; 10458: char *BULLY12to48[25] = { 
; 10459: "you have read\0",
; 10460: "you should have\0",
; 10461: "If you have read\0",
; 10462: "ideas and vision\0",
; 10463: "have read through\0",
; 10464: "preceding chapters\0",
; 10465: "a pretty good idea\0",
; 10466: "and its techniques\0",
; 10467: "idea on how to make\0",
; 10468: "is the largest ever\0",
; 10469: "The purpose of this\0",
; 10470: "electronic repository\0",
; 10471: "much more, a complete,\0",
; 10472: "many people as possible\0",
; 10473: "understanding and knowledge\0",
; 10474: "and to make them available to as\0",
; 10475: "What use you will put it to is up to you.\0",
; 10476: "CD-ROM is to provide access to Osho's words\0",
; 10477: "world view of the New Man and a new way of life\0",
; 10478: "TGAGCACATTGAGAGCCTCCAAGGCATGGAGT\0",
; 10479: "TTGAGAGCCTCCAAGGCATGGAGT\0",
; 10480: "AGCCTCCAAGGCATGGAGT\0",
; 10481: "CCAAGGCATGGAGT\0",
; 10482: "AAGGCATGGAGT\0",
; 10483: "Premium Full Leaf Tea\0",
; 10484: };
; 10485: 
; 10486: long FoundIn;
; 10487: char *FoundInPTR;
; 10488: 
; 10489: printf("strstr_SHORT-SHOWDOWN, revision Doublet_8Triplet_7Trident_7Hasherezade_vs_7Gulliver2_vs_7Elsiane_vs_7sun_vs_7_vs_7sunhorse_vs_7deuce_vs_BMF, written by Kaze.\n");

  055f5	68 00 00 00 00	 push	 OFFSET $SG8253
  055fa	e8 00 00 00 00	 call	 _printf

; 10490: printf("Full credits to: R.S. Boyer, J.S. Moore, R.N. Horspool, D.M. Sunday.\n");

  055ff	68 00 00 00 00	 push	 OFFSET $SG8254
  05604	e8 00 00 00 00	 call	 _printf

; 10491: //printf("Note: There is something very inconsistent even wrong with all timings, still can't figure out the reason!\n");
; 10492: //printf("Note: There is something very buggy with arrays(sometimes the entire function is not executed, but when they (3) are defined as global this bug vanishes?!) of Boyer_Moore_Flensburg, still can't figure out the reason!\n");
; 10493: printf("Usage: strstr_SHORT-SHOWDOWN.exe [anystring] [anystring]\n");

  05609	68 00 00 00 00	 push	 OFFSET $SG8255
  0560e	e8 00 00 00 00	 call	 _printf

; 10494: printf("Example1(keyboard test): strstr_SHORT-SHOWDOWN.exe\n");

  05613	68 00 00 00 00	 push	 OFFSET $SG8256
  05618	e8 00 00 00 00	 call	 _printf

; 10495: printf("Example2(DUMBO 8x2 test): strstr_SHORT-SHOWDOWN.exe go\n");

  0561d	68 00 00 00 00	 push	 OFFSET $SG8257
  05622	e8 00 00 00 00	 call	 _printf

; 10496: printf("Example3(6x2 and 52 tests): strstr_SHORT-SHOWDOWN.exe go go\n");

  05627	68 00 00 00 00	 push	 OFFSET $SG8258
  0562c	e8 00 00 00 00	 call	 _printf

; 10497: Pattern[0]=0x00;
; 10498: Strng = (char *)malloc( 220*1024*1024 );

  05631	68 00 00 c0 0d	 push	 230686720		; 0dc00000H
  05636	c6 44 24 24 00	 mov	 BYTE PTR _Pattern$[esp+2060], 0
  0563b	e8 00 00 00 00	 call	 _malloc
  05640	8b e8		 mov	 ebp, eax
  05642	83 c4 1c	 add	 esp, 28			; 0000001cH

; 10499: if( Strng == NULL )

  05645	85 ed		 test	 ebp, ebp
  05647	75 26		 jne	 SHORT $LN580@main

; 10500: { puts( "strstr_SHORT-SHOWDOWN: Needed memory allocation denied!\n" ); return( 1 ); }

  05649	68 00 00 00 00	 push	 OFFSET $SG8262
  0564e	e8 00 00 00 00	 call	 _puts
  05653	83 c4 04	 add	 esp, 4
  05656	8d 45 01	 lea	 eax, DWORD PTR [ebp+1]
  05659	5d		 pop	 ebp

; 10630: 
; 10631: 
; 10632: 
; 10633: 
; 10634: 
; 10635: 
; 10636: 
; 10637: // As one line: [
; 10638: Railgunhits=0;
; 10639: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10640: clocks1 = clock();
; 10641:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10642: {
; 10643: //Search area is between Strng[0] .. Strng[n-1]
; 10644: 
; 10645: FoundInPTR= Railgun_Quadruplet_7sun_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10646: //printf("%s\n",FoundInPTR);
; 10647: 
; 10648: }
; 10649: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10650: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10651: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10652: printf( "Railgun_Quadruplet_7sun_hits/Railgun_Quadruplet_7sun_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10653: printf( "Railgun_Quadruplet_7sun performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10654: // As one line: ]
; 10655: 
; 10656: 
; 10657: 
; 10658: 
; 10659: 
; 10660: // As one line: [
; 10661: Railgunhits=0;
; 10662: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10663: clocks1 = clock();
; 10664:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10665: {
; 10666: //Search area is between Strng[0] .. Strng[n-1]
; 10667: 
; 10668: FoundInPTR= Railgun_Quadruplet_7_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10669: //printf("%s\n",FoundInPTR);
; 10670: 
; 10671: }
; 10672: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10673: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10674: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10675: printf( "Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10676: printf( "Railgun_Quadruplet_7 performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10677: // As one line: ]
; 10678: 
; 10679: // As one line: [
; 10680: Railgunhits=0;
; 10681: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10682: clocks1 = clock();
; 10683:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10684: {
; 10685: //Search area is between Strng[0] .. Strng[n-1]
; 10686: 
; 10687: FoundInPTR= Railgun_Quadruplet_7Trident_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10688: //printf("%s\n",FoundInPTR);
; 10689: 
; 10690: }
; 10691: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10692: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10693: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10694: printf( "Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10695: printf( "Railgun_Quadruplet_7Trident performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10696: // As one line: ]
; 10697: 
; 10698: 
; 10699: // As one line: [
; 10700: Railgunhits=0;
; 10701: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10702: clocks1 = clock();
; 10703:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10704: {
; 10705: //Search area is between Strng[0] .. Strng[n-1]
; 10706: 
; 10707: FoundInPTR= BNDM_32_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10708: //printf("%s\n",FoundInPTR);
; 10709: 
; 10710: }
; 10711: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10712: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10713: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10714: printf( "BNDM_32_hits/BNDM_32_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10715: printf( "BNDM_32 performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10716: // As one line: ]
; 10717: 
; 10718: 
; 10719: 
; 10720: // As one line: [
; 10721: Railgunhits=0;
; 10722: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10723: clocks1 = clock();
; 10724:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10725: {
; 10726: //Search area is between Strng[0] .. Strng[n-1]
; 10727: 
; 10728: FoundInPTR= Railgun_Quadruplet_7sunhorse_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10729: //printf("%s\n",FoundInPTR);
; 10730: 
; 10731: }
; 10732: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10733: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10734: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10735: printf( "Railgun_Quadruplet_7sunhorse_hits/Railgun_Quadruplet_7sunhorse_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10736: printf( "Railgun_Quadruplet_7sunhorse performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10737: // As one line: ]
; 10738: 
; 10739: 
; 10740: // As one line: [
; 10741: Railgunhits=0;
; 10742: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10743: clocks1 = clock();
; 10744:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10745: {
; 10746: //Search area is between Strng[0] .. Strng[n-1]
; 10747: 
; 10748: FoundInPTR= Railgun_Quadruplet_7deuce_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10749: //printf("%s\n",FoundInPTR);
; 10750: 
; 10751: }
; 10752: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10753: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10754: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10755: printf( "Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10756: printf( "Railgun_Quadruplet_7deuce performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10757: // As one line: ]
; 10758: 
; 10759: 
; 10760: // As one line: [
; 10761: Railgunhits=0;
; 10762: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10763: clocks1 = clock();
; 10764:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10765: {
; 10766: //Search area is between Strng[0] .. Strng[n-1]
; 10767: 
; 10768: FoundInPTR= Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10769: //printf("%s\n",FoundInPTR);
; 10770: 
; 10771: }
; 10772: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10773: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10774: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10775: printf( "Railgun_Quadruplet_7Elsiane_hits/Railgun_Quadruplet_7Elsiane_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10776: printf( "Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10777: // As one line: ]
; 10778: 
; 10779: 
; 10780: // As one line: [
; 10781: Railgunhits=0;
; 10782: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10783: clocks1 = clock();
; 10784:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10785: {
; 10786: //Search area is between Strng[0] .. Strng[n-1]
; 10787: 
; 10788: FoundInPTR= Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10789: //printf("%s\n",FoundInPTR);
; 10790: 
; 10791: }
; 10792: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10793: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10794: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10795: printf( "Railgun_Quadruplet_7Gulliver_hits/Railgun_Quadruplet_7Gulliver_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10796: printf( "Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10797: // As one line: ]
; 10798: 
; 10799: 
; 10800: 
; 10801: // As one line: [
; 10802: Railgunhits=0;
; 10803: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10804: clocks1 = clock();
; 10805:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10806: {
; 10807: //Search area is between Strng[0] .. Strng[n-1]
; 10808: 
; 10809: FoundInPTR= Railgun_Quadruplet_7Hasherezade_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10810: //printf("%s\n",FoundInPTR);
; 10811: 
; 10812: }
; 10813: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10814: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10815: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10816: printf( "Railgun_Quadruplet_7Hasherezade_hits/Railgun_Quadruplet_7Hasherezade_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10817: printf( "Railgun_Quadruplet_7Hasherezade performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10818: // As one line: ]
; 10819: 
; 10820: 
; 10821: 
; 10822: 
; 10823: 
; 10824: // As one line: [
; 10825: Railgunhits=0;
; 10826: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10827: clocks1 = clock();
; 10828:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10829: {
; 10830: //Search area is between Strng[0] .. Strng[n-1]
; 10831: 
; 10832: FoundInPTR= Boyer_Moore_Flensburg(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10833: //printf("%s\n",FoundInPTR);
; 10834: 
; 10835: }
; 10836: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10837: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10838: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10839: printf( "Boyer_Moore_Flensburg_hits/Boyer_Moore_Flensburg_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10840: printf( "Boyer_Moore_Flensburg performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10841: // As one line: ]
; 10842: 
; 10843: 
; 10844: 
; 10845: 
; 10846: 
; 10847: // As one line: [
; 10848: Railgunhits=0;
; 10849: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10850: clocks1 = clock();
; 10851:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10852: {
; 10853: //Search area is between Strng[0] .. Strng[n-1]
; 10854: 
; 10855: FoundInPTR= TW(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10856: //printf("%s\n",FoundInPTR);
; 10857: 
; 10858: }
; 10859: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10860: printf( "Two-Way_hits/Two-Way_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10861: printf( "Two-Way performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10862: // As one line: ]
; 10863: 
; 10864: exit(0);
; 10865: 
; 10866: 
; 10867: 
; 10868: 
; 10869: if (argc==1) {
; 10870: 
; 10871: goto zzzzzzzzzzzzzzzzz;
; 10872: 
; 10873: // As one line: [
; 10874: Railgunhits=0;
; 10875: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10876: clocks1 = clock();
; 10877:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10878: {
; 10879: //Search area is between Strng[0] .. Strng[n-1]
; 10880: 
; 10881: 	FoundInPTR = TW(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10882: //printf("%s\n",FoundInPTR);
; 10883: 
; 10884: }
; 10885: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10886: printf( "TW_hits/TW_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10887: printf( "TW performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10888: // As one line: ]
; 10889: 
; 10890: 
; 10891: 
; 10892: 
; 10893: // As one line: [
; 10894: Railgunhits=0;
; 10895: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10896: clocks1 = clock();
; 10897:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10898: {
; 10899: //Search area is between Strng[0] .. Strng[n-1]
; 10900: 
; 10901: 	dummy = HORSPOOL_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10902: 
; 10903: }
; 10904: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10905: printf( "BM_HORSPOOL_hits/BM_HORSPOOL_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10906: printf( "BM_HORSPOOL performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10907: // As one line: ]
; 10908: 
; 10909: 
; 10910: 
; 10911: // As one line: [
; 10912: Railgunhits=0;
; 10913: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10914: clocks1 = clock();
; 10915:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10916: {
; 10917: //Search area is between Strng[0] .. Strng[n-1]
; 10918: 
; 10919: 	FoundInPTR = Railgun_totalhits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10920: 
; 10921: }
; 10922: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10923: printf( "Railgun_hits/Railgun_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10924: printf( "Railgun performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10925: // As one line: ]
; 10926: 
; 10927: zzzzzzzzzzzzzzzzz:
; 10928: 
; 10929: // As one line: [
; 10930: Railgunhits=0;
; 10931: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10932: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");
; 10933: clocks1 = clock();
; 10934:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10935: {
; 10936: //Search area is between Strng[0] .. Strng[n-1]
; 10937: 
; 10938: 	FoundInPTR = Railgun_Quadruplet_6pp_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10939: 
; 10940: }
; 10941: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10942: printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10943: printf( "Railgun_6pp performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10944: // As one line: ]
; 10945: 
; 10946: 
; 10947: 
; 10948: // As one line: [
; 10949: Railgunhits=0;
; 10950: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10951: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");
; 10952: clocks1 = clock();
; 10953:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10954: {
; 10955: //Search area is between Strng[0] .. Strng[n-1]
; 10956: 
; 10957: 	FoundInPTR = Railgun_Quadruplet_7deuce_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10958: 
; 10959: }
; 10960: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10961: printf( "Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10962: printf( "Railgun_Quadruplet_7deuce performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10963: // As one line: ]
; 10964: 
; 10965: 
; 10966: 
; 10967: // As one line: [
; 10968: Railgunhits=0;
; 10969: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10970: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");
; 10971: clocks1 = clock();
; 10972:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10973: {
; 10974: //Search area is between Strng[0] .. Strng[n-1]
; 10975: 
; 10976: 	FoundInPTR = Railgun_Quadruplet_7_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10977: 
; 10978: }
; 10979: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10980: printf( "Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10981: printf( "Railgun_Quadruplet_7 performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10982: // As one line: ]
; 10983: 
; 10984: 
; 10985: 
; 10986: 
; 10987: 
; 10988: 
; 10989: 
; 10990: 
; 10991: } //if (argc==1) {
; 10992: 
; 10993: 
; 10994: // NEW TEST APPROACH HERE - the old BMH loop of Railgun_Quadruplet_6pp is 67 bytes long whereas the new Railgun_Quadruplet_7mm has 61 i.e. under 64. [
; 10995: // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; 10996: 
; 10997: printf( "\nNote: Executing the next two tests 256 times i.e. the search is for 256x8x2 patterns!\n");
; 10998: 
; 10999: ReallyTraversed=0;
; 11000: // As one line: [
; 11001: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ... Not-Counting-Hits-Just-Returns-First-One\n", Strnglen);
; 11002: clocks1 = clock();
; 11003:     for (Bozan=0; Bozan < (1<<8); Bozan++) // 16 times, at end >>4
; 11004: {
; 11005: //Search area is between Strng[0] .. Strng[n-1]
; 11006: 
; 11007: for (i = 0; i<8; i++)
; 11008:    {
; 11009: Railgunhits=0;
; 11010: clocks3 = clock();
; 11011: 	FoundInPTR = Railgun_Quadruplet_6pp(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11012: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11013: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11014: clocks4 = clock();
; 11015: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11016:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", DumboBox[i][0], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11017: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", DumboBox[i][0], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11018:                        }
; 11019: Railgunhits=0;
; 11020: clocks3 = clock();
; 11021: 	FoundInPTR = Railgun_Quadruplet_6pp(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11022: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11023: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11024: clocks4 = clock();
; 11025: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11026:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", DumboBox[i][1], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11027: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", DumboBox[i][1], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11028: 
; 11029:                        }
; 11030:    }
; 11031: }
; 11032: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11033: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11034: printf( "Railgun_Quadruplet_6pp 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)ReallyTraversed/((long)(TotalRoughSearchTime)))>>10);
; 11035: printf( "ReallyTraversed: %s bytes\n", _ui64toaKAZEcomma(ReallyTraversed, llTOaDigits, 10));
; 11036: // As one line: ]
; 11037: 
; 11038: 
; 11039: ReallyTraversed=0;
; 11040: // As one line: [
; 11041: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ... Not-Counting-Hits-Just-Returns-First-One\n", Strnglen);
; 11042: clocks1 = clock();
; 11043:     for (Bozan=0; Bozan < (1<<8); Bozan++) // 16 times, at end >>4
; 11044: {
; 11045: //Search area is between Strng[0] .. Strng[n-1]
; 11046: 
; 11047: for (i = 0; i<8; i++)
; 11048:    {
; 11049: Railgunhits=0;
; 11050: clocks3 = clock();
; 11051: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11052: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11053: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11054: clocks4 = clock();
; 11055: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11056:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][0], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11057: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][0], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11058:                        }
; 11059: Railgunhits=0;
; 11060: clocks3 = clock();
; 11061: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11062: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11063: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11064: clocks4 = clock();
; 11065: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11066:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][1], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11067: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][1], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11068:                        }
; 11069:    }
; 11070: }
; 11071: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11072: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11073: printf( "Railgun_Quadruplet_7 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)ReallyTraversed/((long)(TotalRoughSearchTime)))>>10);
; 11074: printf( "ReallyTraversed: %s bytes\n", _ui64toaKAZEcomma(ReallyTraversed, llTOaDigits, 10));
; 11075: // As one line: ]
; 11076: 
; 11077: // ====================================================================================================================
; 11078: 
; 11079: printf( "\nNote: Executing the next two tests 256 times i.e. the search is for 256x52 patterns, all utilizing BMH!\n");
; 11080: 
; 11081: 
; 11082: ReallyTraversed=0;
; 11083: // As one line: [
; 11084: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ... Not-Counting-Hits-Just-Returns-First-One\n", Strnglen);
; 11085: clocks1 = clock();
; 11086:     for (Bozan=0; Bozan < (1<<8); Bozan++) // 16 times, at end >>4
; 11087: {
; 11088: //Search area is between Strng[0] .. Strng[n-1]
; 11089: 
; 11090: for (i = 0; i<52; i++)
; 11091:    {
; 11092: Railgunhits=0;
; 11093: clocks3 = clock();
; 11094: 	FoundInPTR = Railgun_Quadruplet_6pp(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11095: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11096: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11097: clocks4 = clock();
; 11098: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11099:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", Dumbino[i], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11100: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", Dumbino[i], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11101:                        }
; 11102:    }
; 11103: }
; 11104: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11105: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11106: printf( "Railgun_Quadruplet_6pp 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)ReallyTraversed/((long)(TotalRoughSearchTime)))>>10);
; 11107: printf( "TotalRoughSearchTime: %s clocks\n", _ui64toaKAZEcomma(TotalRoughSearchTime, llTOaDigits, 10));
; 11108: printf( "ReallyTraversed: %s bytes\n", _ui64toaKAZEcomma(ReallyTraversed, llTOaDigits, 10));
; 11109: // As one line: ]
; 11110: 
; 11111: 
; 11112: 
; 11113: ReallyTraversed=0;
; 11114: // As one line: [
; 11115: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ... Not-Counting-Hits-Just-Returns-First-One\n", Strnglen);
; 11116: clocks1 = clock();
; 11117:     for (Bozan=0; Bozan < (1<<8); Bozan++) // 16 times, at end >>4
; 11118: {
; 11119: //Search area is between Strng[0] .. Strng[n-1]
; 11120: 
; 11121: for (i = 0; i<52; i++)
; 11122:    {
; 11123: Railgunhits=0;
; 11124: clocks3 = clock();
; 11125: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11126: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11127: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11128: clocks4 = clock();
; 11129: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11130:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", Dumbino[i], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11131: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", Dumbino[i], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11132:                        }
; 11133:    }
; 11134: }
; 11135: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11136: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11137: printf( "Railgun_Quadruplet_7 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)ReallyTraversed/((long)(TotalRoughSearchTime)))>>10);
; 11138: printf( "TotalRoughSearchTime: %s clocks\n", _ui64toaKAZEcomma(TotalRoughSearchTime, llTOaDigits, 10));
; 11139: printf( "ReallyTraversed: %s bytes\n", _ui64toaKAZEcomma(ReallyTraversed, llTOaDigits, 10));
; 11140: // As one line: ]
; 11141: 
; 11142: 
; 11143: // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; 11144: // NEW TEST APPROACH HERE - the old BMH loop of Railgun_Quadruplet_6pp is 67 bytes long whereas the new Railgun_Quadruplet_7mm has 61 i.e. under 64. ]
; 11145: 
; 11146: 
; 11147: 
; 11148: 
; 11149: 
; 11150: SlowerButStronger:
; 11151: goto QuickToHits;
; 11152: 
; 11153: 
; 11154: 
; 11155: // As one line: [
; 11156: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11157: clocks1 = clock();
; 11158:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11159: {
; 11160: //Search area is between Strng[0] .. Strng[n-1]
; 11161: 
; 11162: for (i = 0; i<8; i++)
; 11163:    {
; 11164: Railgunhits=0;
; 11165: clocks3 = clock();
; 11166: 	dummy = HORSPOOL_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11167: clocks4 = clock();
; 11168: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11169:                          printf( "Found ('%s') %d time(s), BM_HORSPOOL performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11170:                        }
; 11171: Railgunhits=0;
; 11172: clocks3 = clock();
; 11173: 	dummy = HORSPOOL_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11174: clocks4 = clock();
; 11175: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11176:                          printf( "Found ('%s') %d time(s), BM_HORSPOOL performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11177:                        }
; 11178:    }
; 11179: }
; 11180: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11181: //printf( "BM_HORSPOOL_hits/BM_HORSPOOL_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11182: printf( "BM_HORSPOOL 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11183: // As one line: ]
; 11184: 
; 11185: 
; 11186: /*
; 11187: // As one line: [
; 11188: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11189: clocks1 = clock();
; 11190:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11191: {
; 11192: //Search area is between Strng[0] .. Strng[n-1]
; 11193: 
; 11194: for (i = 0; i<8; i++)
; 11195:    {
; 11196: Railgunhits=0;
; 11197: clocks3 = clock();
; 11198: 	FoundInPTR = TW(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11199: clocks4 = clock();
; 11200: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11201:                          printf( "Found ('%s') %d time(s), TW performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11202:                        }
; 11203: Railgunhits=0;
; 11204: clocks3 = clock();
; 11205: 	FoundInPTR = TW(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11206: clocks4 = clock();
; 11207: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11208:                          printf( "Found ('%s') %d time(s), TW performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11209:                        }
; 11210:    }
; 11211: }
; 11212: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11213: //printf( "Two-way_hits/Two-way_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11214: printf( "TW 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11215: // As one line: ]
; 11216: */
; 11217: 
; 11218: 
; 11219: 
; 11220: 
; 11221: // As one line: [
; 11222: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11223: clocks1 = clock();
; 11224:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11225: {
; 11226: //Search area is between Strng[0] .. Strng[n-1]
; 11227: 
; 11228: for (i = 0; i<8; i++)
; 11229:    {
; 11230: Railgunhits=0;
; 11231: clocks3 = clock();
; 11232: 	FoundInPTR = Railgun_Quadruplet_6pp_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11233: clocks4 = clock();
; 11234: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11235:                          printf( "Found ('%s') %d time(s), Railgun_6pp performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11236:                        }
; 11237: Railgunhits=0;
; 11238: clocks3 = clock();
; 11239: 	FoundInPTR = Railgun_Quadruplet_6pp_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11240: clocks4 = clock();
; 11241: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11242:                          printf( "Found ('%s') %d time(s), Railgun_6pp performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11243:                        }
; 11244:    }
; 11245: }
; 11246: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11247: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11248: printf( "Railgun_6pp 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11249: // As one line: ]
; 11250: 
; 11251: 
; 11252: 
; 11253: QuickToHits:
; 11254: 
; 11255: 
; 11256: 
; 11257: 
; 11258: 
; 11259: 
; 11260: GlobalSP = 0;
; 11261: GlobalI = 0;
; 11262: 
; 11263: // As one line: [
; 11264: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11265: clocks1 = clock();
; 11266:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11267: {
; 11268: //Search area is between Strng[0] .. Strng[n-1]
; 11269: 
; 11270: for (i = 0+2; i<8; i++)
; 11271:    {
; 11272: Railgunhits=0;
; 11273: clocks3 = clock();
; 11274: 	FoundInPTR = Railgun_Quadruplet_7sun_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11275: clocks4 = clock();
; 11276: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11277:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sun performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11278:                        }
; 11279: Railgunhits=0;
; 11280: clocks3 = clock();
; 11281: 	FoundInPTR = Railgun_Quadruplet_7sun_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11282: clocks4 = clock();
; 11283: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11284:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sun performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11285:                        }
; 11286:    }
; 11287: }
; 11288: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11289: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11290: printf( "Railgun_Quadruplet_7sun 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11291: // As one line: ]
; 11292: 
; 11293: printf( "Railgun_Quadruplet_7sun 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11294: 
; 11295: 
; 11296: GlobalSP = 0;
; 11297: GlobalI = 0;
; 11298: 
; 11299: // As one line: [
; 11300: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11301: clocks1 = clock();
; 11302:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11303: {
; 11304: //Search area is between Strng[0] .. Strng[n-1]
; 11305: 
; 11306: for (i = 0+2; i<8; i++)
; 11307:    {
; 11308: Railgunhits=0;
; 11309: clocks3 = clock();
; 11310: 	FoundInPTR = Railgun_Quadruplet_7_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11311: clocks4 = clock();
; 11312: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11313:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11314:                        }
; 11315: Railgunhits=0;
; 11316: clocks3 = clock();
; 11317: 	FoundInPTR = Railgun_Quadruplet_7_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11318: clocks4 = clock();
; 11319: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11320:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11321:                        }
; 11322:    }
; 11323: }
; 11324: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11325: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11326: printf( "Railgun_Quadruplet_7 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11327: // As one line: ]
; 11328: 
; 11329: printf( "Railgun_Quadruplet_7 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11330: 
; 11331: 
; 11332: 
; 11333: 
; 11334: 
; 11335: 
; 11336: GlobalSP = 0;
; 11337: GlobalI = 0;
; 11338: 
; 11339: // As one line: [
; 11340: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11341: clocks1 = clock();
; 11342:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11343: {
; 11344: //Search area is between Strng[0] .. Strng[n-1]
; 11345: 
; 11346: for (i = 0+2; i<8; i++)
; 11347:    {
; 11348: Railgunhits=0;
; 11349: clocks3 = clock();
; 11350: 	FoundInPTR = BNDM_32_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11351: clocks4 = clock();
; 11352: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11353:                          printf( "Found ('%s') %d time(s), BNDM_32 performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11354:                        }
; 11355: Railgunhits=0;
; 11356: clocks3 = clock();
; 11357: 	FoundInPTR = BNDM_32_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11358: clocks4 = clock();
; 11359: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11360:                          printf( "Found ('%s') %d time(s), BNDM_32 performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11361:                        }
; 11362:    }
; 11363: }
; 11364: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11365: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11366: printf( "BNDM_32 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11367: // As one line: ]
; 11368: 
; 11369: printf( "BNDM_32 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11370: 
; 11371: 
; 11372: 
; 11373: 
; 11374: 
; 11375: 
; 11376: 
; 11377: 
; 11378: 
; 11379: 
; 11380: 
; 11381: 
; 11382: 
; 11383: 
; 11384: 
; 11385: 
; 11386: 
; 11387: 
; 11388: GlobalSP = 0;
; 11389: GlobalI = 0;
; 11390: 
; 11391: // As one line: [
; 11392: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11393: clocks1 = clock();
; 11394:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11395: {
; 11396: //Search area is between Strng[0] .. Strng[n-1]
; 11397: 
; 11398: for (i = 0+2; i<8; i++)
; 11399:    {
; 11400: Railgunhits=0;
; 11401: clocks3 = clock();
; 11402: 	FoundInPTR = Railgun_Quadruplet_7sunhorse_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11403: clocks4 = clock();
; 11404: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11405:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sunhorse performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11406:                        }
; 11407: Railgunhits=0;
; 11408: clocks3 = clock();
; 11409: 	FoundInPTR = Railgun_Quadruplet_7sunhorse_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11410: clocks4 = clock();
; 11411: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11412:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sunhorse performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11413:                        }
; 11414:    }
; 11415: }
; 11416: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11417: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11418: printf( "Railgun_Quadruplet_7sunhorse 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11419: // As one line: ]
; 11420: 
; 11421: printf( "Railgun_Quadruplet_7sunhorse 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11422: 
; 11423: 
; 11424: 
; 11425: GlobalSP = 0;
; 11426: GlobalI = 0;
; 11427: 
; 11428: // As one line: [
; 11429: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11430: clocks1 = clock();
; 11431:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11432: {
; 11433: //Search area is between Strng[0] .. Strng[n-1]
; 11434: 
; 11435: for (i = 0+2; i<8; i++)
; 11436:    {
; 11437: Railgunhits=0;
; 11438: clocks3 = clock();
; 11439: 	FoundInPTR = Railgun_Quadruplet_7deuce_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11440: clocks4 = clock();
; 11441: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11442:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7deuce performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11443:                        }
; 11444: Railgunhits=0;
; 11445: clocks3 = clock();
; 11446: 	FoundInPTR = Railgun_Quadruplet_7deuce_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11447: clocks4 = clock();
; 11448: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11449:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7deuce performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11450:                        }
; 11451:    }
; 11452: }
; 11453: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11454: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11455: printf( "Railgun_Quadruplet_7deuce 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11456: // As one line: ]
; 11457: 
; 11458: printf( "Railgun_Quadruplet_7deuce 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11459: 
; 11460: 
; 11461: 
; 11462: GlobalSP = 0;
; 11463: GlobalI = 0;
; 11464: 
; 11465: // As one line: [
; 11466: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11467: clocks1 = clock();
; 11468:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11469: {
; 11470: //Search area is between Strng[0] .. Strng[n-1]
; 11471: 
; 11472: for (i = 0+2; i<8; i++)
; 11473:    {
; 11474: Railgunhits=0;
; 11475: clocks3 = clock();
; 11476: 	FoundInPTR = Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11477: clocks4 = clock();
; 11478: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11479:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11480:                        }
; 11481: Railgunhits=0;
; 11482: clocks3 = clock();
; 11483: 	FoundInPTR = Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11484: clocks4 = clock();
; 11485: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11486:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11487:                        }
; 11488:    }
; 11489: }
; 11490: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11491: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11492: printf( "Railgun_Quadruplet_7Elsiane 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11493: // As one line: ]
; 11494: 
; 11495: printf( "Railgun_Quadruplet_7Elsiane 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11496: 
; 11497: 
; 11498: 
; 11499: GlobalSP = 0;
; 11500: GlobalI = 0;
; 11501: 
; 11502: // As one line: [
; 11503: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11504: clocks1 = clock();
; 11505:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11506: {
; 11507: //Search area is between Strng[0] .. Strng[n-1]
; 11508: 
; 11509: for (i = 0+2; i<8; i++)
; 11510:    {
; 11511: Railgunhits=0;
; 11512: clocks3 = clock();
; 11513: 	FoundInPTR = Boyer_Moore_Flensburg(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11514: clocks4 = clock();
; 11515: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11516:                          printf( "Found ('%s') %d time(s), Boyer_Moore_Flensburg performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11517:                        }
; 11518: Railgunhits=0;
; 11519: clocks3 = clock();
; 11520: 	FoundInPTR = Boyer_Moore_Flensburg(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11521: clocks4 = clock();
; 11522: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11523:                          printf( "Found ('%s') %d time(s), Boyer_Moore_Flensburg performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11524:                        }
; 11525:    }
; 11526: }
; 11527: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11528: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11529: printf( "Boyer_Moore_Flensburg 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11530: // As one line: ]
; 11531: 
; 11532: printf( "Boyer_Moore_Flensburg 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11533: 
; 11534: 
; 11535: 
; 11536: 
; 11537: GlobalSP = 0;
; 11538: GlobalI = 0;
; 11539: 
; 11540: // As one line: [
; 11541: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11542: clocks1 = clock();
; 11543:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11544: {
; 11545: //Search area is between Strng[0] .. Strng[n-1]
; 11546: 
; 11547: for (i = 0+2; i<8; i++)
; 11548:    {
; 11549: Railgunhits=0;
; 11550: clocks3 = clock();
; 11551: 	FoundInPTR = Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11552: clocks4 = clock();
; 11553: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11554:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11555:                        }
; 11556: Railgunhits=0;
; 11557: clocks3 = clock();
; 11558: 	FoundInPTR = Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11559: clocks4 = clock();
; 11560: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11561:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11562:                        }
; 11563:    }
; 11564: }
; 11565: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11566: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11567: printf( "Railgun_Quadruplet_7Gulliver 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11568: // As one line: ]
; 11569: 
; 11570: printf( "Railgun_Quadruplet_7Gulliver 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11571: 
; 11572: 
; 11573: 
; 11574: GlobalSP = 0;
; 11575: GlobalI = 0;
; 11576: 
; 11577: // As one line: [
; 11578: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11579: clocks1 = clock();
; 11580:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11581: {
; 11582: //Search area is between Strng[0] .. Strng[n-1]
; 11583: 
; 11584: for (i = 0+2; i<8; i++)
; 11585:    {
; 11586: Railgunhits=0;
; 11587: clocks3 = clock();
; 11588: 	FoundInPTR = Brute_Force_Dummy(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11589: clocks4 = clock();
; 11590: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11591:                          printf( "Found ('%s') %d time(s), Brute_Force_Dummy performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11592:                        }
; 11593: Railgunhits=0;
; 11594: clocks3 = clock();
; 11595: 	FoundInPTR = Brute_Force_Dummy(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11596: clocks4 = clock();
; 11597: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11598:                          printf( "Found ('%s') %d time(s), Brute_Force_Dummy performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11599:                        }
; 11600:    }
; 11601: }
; 11602: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11603: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11604: printf( "Brute_Force_Dummy 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11605: // As one line: ]
; 11606: 
; 11607: printf( "Brute_Force_Dummy 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11608: 
; 11609: 
; 11610: 
; 11611: 
; 11612: // [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
; 11613: 
; 11614: 
; 11615: GlobalSP = 0;
; 11616: GlobalI = 0;
; 11617: 
; 11618: // As one line: [
; 11619: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11620: clocks1 = clock();
; 11621:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11622: {
; 11623: //Search area is between Strng[0] .. Strng[n-1]
; 11624: 
; 11625: for (i = 0; i<25; i++)
; 11626:    {
; 11627: Railgunhits=0;
; 11628: clocks3 = clock();
; 11629: 	FoundInPTR = Railgun_Quadruplet_7sun_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11630: clocks4 = clock();
; 11631: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11632:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sun performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11633:                        }
; 11634:    }
; 11635: }
; 11636: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11637: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11638: printf( "Railgun_Quadruplet_7sun 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11639: // As one line: ]
; 11640: 
; 11641: printf( "Railgun_Quadruplet_7sun 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11642: 
; 11643: 
; 11644: GlobalSP = 0;
; 11645: GlobalI = 0;
; 11646: 
; 11647: // As one line: [
; 11648: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11649: clocks1 = clock();
; 11650:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11651: {
; 11652: //Search area is between Strng[0] .. Strng[n-1]
; 11653: 
; 11654: for (i = 0; i<25; i++)
; 11655:    {
; 11656: Railgunhits=0;
; 11657: clocks3 = clock();
; 11658: 	FoundInPTR = Railgun_Quadruplet_7Trident_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11659: clocks4 = clock();
; 11660: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11661:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Trident performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11662:                        }
; 11663:    }
; 11664: }
; 11665: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11666: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11667: printf( "Railgun_Quadruplet_7Trident 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11668: // As one line: ]
; 11669: 
; 11670: printf( "Railgun_Quadruplet_7Trident 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11671: 
; 11672: 
; 11673: GlobalSP = 0;
; 11674: GlobalI = 0;
; 11675: 
; 11676: // As one line: [
; 11677: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11678: clocks1 = clock();
; 11679:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11680: {
; 11681: //Search area is between Strng[0] .. Strng[n-1]
; 11682: 
; 11683: for (i = 0; i<25; i++)
; 11684:    {
; 11685: Railgunhits=0;
; 11686: clocks3 = clock();
; 11687: 	FoundInPTR = BNDM_32_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11688: clocks4 = clock();
; 11689: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11690:                          printf( "Found ('%s') %d time(s), BNDM performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11691:                        }
; 11692:    }
; 11693: }
; 11694: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11695: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11696: printf( "BNDM 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11697: // As one line: ]
; 11698: 
; 11699: printf( "BNDM 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11700: 
; 11701: 
; 11702: 
; 11703: GlobalSP = 0;
; 11704: GlobalI = 0;
; 11705: 
; 11706: // As one line: [
; 11707: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11708: clocks1 = clock();
; 11709:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11710: {
; 11711: //Search area is between Strng[0] .. Strng[n-1]
; 11712: 
; 11713: for (i = 0; i<25; i++)
; 11714:    {
; 11715: Railgunhits=0;
; 11716: clocks3 = clock();
; 11717: 	FoundInPTR = Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11718: clocks4 = clock();
; 11719: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11720:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11721:                        }
; 11722:    }
; 11723: }
; 11724: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11725: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11726: printf( "Railgun_Quadruplet_7Elsiane 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11727: // As one line: ]
; 11728: 
; 11729: printf( "Railgun_Quadruplet_7Elsiane 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11730: 
; 11731: 
; 11732: GlobalSP = 0;
; 11733: GlobalI = 0;
; 11734: 
; 11735: // As one line: [
; 11736: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11737: clocks1 = clock();
; 11738:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11739: {
; 11740: //Search area is between Strng[0] .. Strng[n-1]
; 11741: 
; 11742: for (i = 0; i<25; i++)
; 11743:    {
; 11744: Railgunhits=0;
; 11745: clocks3 = clock();
; 11746: 	FoundInPTR = Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11747: clocks4 = clock();
; 11748: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11749:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11750:                        }
; 11751:    }
; 11752: }
; 11753: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11754: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11755: printf( "Railgun_Quadruplet_7Gulliver 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11756: // As one line: ]
; 11757: 
; 11758: printf( "Railgun_Quadruplet_7Gulliver 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11759: 
; 11760: 
; 11761: GlobalSP = 0;
; 11762: GlobalI = 0;
; 11763: 
; 11764: // As one line: [
; 11765: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11766: clocks1 = clock();
; 11767:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11768: {
; 11769: //Search area is between Strng[0] .. Strng[n-1]
; 11770: 
; 11771: for (i = 0; i<25; i++)
; 11772:    {
; 11773: Railgunhits=0;
; 11774: clocks3 = clock();
; 11775: 	FoundInPTR = Railgun_Quadruplet_7Hasherezade_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11776: clocks4 = clock();
; 11777: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11778:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Hasherezade performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11779:                        }
; 11780:    }
; 11781: }
; 11782: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11783: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11784: printf( "Railgun_Quadruplet_7Hasherezade 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11785: // As one line: ]
; 11786: 
; 11787: printf( "Railgun_Quadruplet_7Hasherezade 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11788: 
; 11789: 
; 11790: 
; 11791: // ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
; 11792: 
; 11793: 
; 11794: 
; 11795: 
; 11796: 
; 11797: 
; 11798: 
; 11799: 
; 11800: 
; 11801: 
; 11802: 
; 11803: 
; 11804: 
; 11805: 
; 11806: 
; 11807: 
; 11808: 
; 11809: 
; 11810: 
; 11811: 
; 11812: GlobalSP = 0;
; 11813: GlobalI = 0;
; 11814: 
; 11815: // As one line: [
; 11816: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11817: clocks1 = clock();
; 11818:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11819: {
; 11820: //Search area is between Strng[0] .. Strng[n-1]
; 11821: 
; 11822: for (i = 0; i<52; i++)
; 11823:    {
; 11824: Railgunhits=0;
; 11825: clocks3 = clock();
; 11826: 	FoundInPTR = Railgun_Quadruplet_7sun_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11827: clocks4 = clock();
; 11828: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11829:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sun performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11830:                        }
; 11831:    }
; 11832: }
; 11833: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11834: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11835: printf( "Railgun_Quadruplet_7sun 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11836: // As one line: ]
; 11837: 
; 11838: printf( "Railgun_Quadruplet_7sun 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11839: 
; 11840: 
; 11841: GlobalSP = 0;
; 11842: GlobalI = 0;
; 11843: 
; 11844: // As one line: [
; 11845: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11846: clocks1 = clock();
; 11847:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11848: {
; 11849: //Search area is between Strng[0] .. Strng[n-1]
; 11850: 
; 11851: for (i = 0; i<52; i++)
; 11852:    {
; 11853: Railgunhits=0;
; 11854: clocks3 = clock();
; 11855: 	FoundInPTR = Railgun_Quadruplet_7_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11856: clocks4 = clock();
; 11857: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11858:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7 performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11859:                        }
; 11860:    }
; 11861: }
; 11862: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11863: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11864: printf( "Railgun_Quadruplet_7 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11865: // As one line: ]
; 11866: 
; 11867: printf( "Railgun_Quadruplet_7 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11868: 
; 11869: 
; 11870: 
; 11871: GlobalSP = 0;
; 11872: GlobalI = 0;
; 11873: 
; 11874: // As one line: [
; 11875: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11876: clocks1 = clock();
; 11877:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11878: {
; 11879: //Search area is between Strng[0] .. Strng[n-1]
; 11880: 
; 11881: for (i = 0; i<52; i++)
; 11882:    {
; 11883: Railgunhits=0;
; 11884: clocks3 = clock();
; 11885: 	FoundInPTR = Railgun_Quadruplet_7sunhorse_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11886: clocks4 = clock();
; 11887: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11888:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sunhorse performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11889:                        }
; 11890:    }
; 11891: }
; 11892: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11893: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11894: printf( "Railgun_Quadruplet_7sunhorse 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11895: // As one line: ]
; 11896: 
; 11897: printf( "Railgun_Quadruplet_7sunhorse 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11898: 
; 11899: 
; 11900: GlobalSP = 0;
; 11901: GlobalI = 0;
; 11902: 
; 11903: // As one line: [
; 11904: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11905: clocks1 = clock();
; 11906:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11907: {
; 11908: //Search area is between Strng[0] .. Strng[n-1]
; 11909: 
; 11910: for (i = 0; i<52; i++)
; 11911:    {
; 11912: Railgunhits=0;
; 11913: clocks3 = clock();
; 11914: 	FoundInPTR = Railgun_Quadruplet_7deuce_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11915: clocks4 = clock();
; 11916: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11917:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7deuce performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11918:                        }
; 11919:    }
; 11920: }
; 11921: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11922: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11923: printf( "Railgun_Quadruplet_7deuce 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11924: // As one line: ]
; 11925: 
; 11926: printf( "Railgun_Quadruplet_7deuce 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11927: 
; 11928: 
; 11929: GlobalSP = 0;
; 11930: GlobalI = 0;
; 11931: 
; 11932: // As one line: [
; 11933: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11934: clocks1 = clock();
; 11935:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11936: {
; 11937: //Search area is between Strng[0] .. Strng[n-1]
; 11938: 
; 11939: for (i = 0; i<52; i++)
; 11940:    {
; 11941: Railgunhits=0;
; 11942: clocks3 = clock();
; 11943: 	FoundInPTR = Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11944: clocks4 = clock();
; 11945: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11946:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11947:                        }
; 11948:    }
; 11949: }
; 11950: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11951: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11952: printf( "Railgun_Quadruplet_7Elsiane 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11953: // As one line: ]
; 11954: 
; 11955: printf( "Railgun_Quadruplet_7Elsiane 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11956: 
; 11957: 
; 11958: 
; 11959: 
; 11960: GlobalSP = 0;
; 11961: GlobalI = 0;
; 11962: 
; 11963: // As one line: [
; 11964: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11965: clocks1 = clock();
; 11966:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11967: {
; 11968: //Search area is between Strng[0] .. Strng[n-1]
; 11969: 
; 11970: for (i = 0; i<52; i++)
; 11971:    {
; 11972: Railgunhits=0;
; 11973: clocks3 = clock();
; 11974: 	FoundInPTR = Boyer_Moore_Flensburg(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11975: clocks4 = clock();
; 11976: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11977:                          printf( "Found ('%s') %d time(s), Boyer_Moore_Flensburg performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11978:                        }
; 11979:    }
; 11980: }
; 11981: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11982: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11983: printf( "Boyer_Moore_Flensburg 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11984: // As one line: ]
; 11985: 
; 11986: printf( "Boyer_Moore_Flensburg 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11987: 
; 11988: 
; 11989: 
; 11990: 
; 11991: 
; 11992: GlobalSP = 0;
; 11993: GlobalI = 0;
; 11994: 
; 11995: // As one line: [
; 11996: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11997: clocks1 = clock();
; 11998:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11999: {
; 12000: //Search area is between Strng[0] .. Strng[n-1]
; 12001: 
; 12002: for (i = 0; i<52; i++)
; 12003:    {
; 12004: Railgunhits=0;
; 12005: clocks3 = clock();
; 12006: 	FoundInPTR = Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 12007: clocks4 = clock();
; 12008: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 12009:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 12010:                        }
; 12011:    }
; 12012: }
; 12013: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12014: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12015: printf( "Railgun_Quadruplet_7Gulliver 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12016: // As one line: ]
; 12017: 
; 12018: printf( "Railgun_Quadruplet_7Gulliver 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 12019: 
; 12020: 
; 12021: 
; 12022: 
; 12023: 
; 12024: GlobalSP = 0;
; 12025: GlobalI = 0;
; 12026: 
; 12027: // As one line: [
; 12028: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 12029: clocks1 = clock();
; 12030:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12031: {
; 12032: //Search area is between Strng[0] .. Strng[n-1]
; 12033: 
; 12034: for (i = 0; i<52; i++)
; 12035:    {
; 12036: Railgunhits=0;
; 12037: clocks3 = clock();
; 12038: 	FoundInPTR = Brute_Force_Dummy(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 12039: clocks4 = clock();
; 12040: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 12041:                          printf( "Found ('%s') %d time(s), Brute_Force_Dummy performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 12042:                        }
; 12043:    }
; 12044: }
; 12045: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12046: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12047: printf( "Brute_Force_Dummy 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12048: // As one line: ]
; 12049: 
; 12050: printf( "Brute_Force_Dummy 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 12051: 
; 12052: 
; 12053: 
; 12054: 
; 12055: 
; 12056: 
; 12057: 
; 12058: 
; 12059: 
; 12060: 
; 12061: 
; 12062: //exit(0);
; 12063: 
; 12064: 
; 12065: 
; 12066: 
; 12067: 
; 12068: 
; 12069: 
; 12070: if (argc==1) {
; 12071: 
; 12072: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) line-by-line ...\n", Patternlen, Strnglen);
; 12073: 
; 12074: // 7[
; 12075: clocks1 = clock();
; 12076:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12077: {
; 12078: //Search area is between Strng[0] .. Strng[n-1]
; 12079: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12080: ThunderwithL=0;ThunderwithR=0;
; 12081: 	for (;;)
; 12082: 	{
; 12083: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12084: 	FoundInPTR = strstr_Microsoft(&Strng[ThunderwithL], &Pattern[0]);
; 12085: 	if ( FoundInPTR != NULL) {strstrMicrosofthits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12086: 	LinesEncountered++;
; 12087: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12088: 	if (ThunderwithR >= Strnglen-1) break;
; 12089: 	}
; 12090: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12091: }
; 12092: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12093: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12094: printf( "strstr_Microsoft_hits/strstr_Microsoft_clocks: %lu/%lu\n", strstrMicrosofthits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12095: printf( "strstr_Microsoft performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12096: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12097: // 7]
; 12098: 
; 12099: // 8[
; 12100: clocks1 = clock();
; 12101:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12102: {
; 12103: //Search area is between Strng[0] .. Strng[n-1]
; 12104: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12105: ThunderwithL=0;ThunderwithR=0;
; 12106: 	for (;;)
; 12107: 	{
; 12108: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12109: 	FoundInPTR = strstr_GNU_C_Library(&Strng[ThunderwithL], &Pattern[0]);
; 12110: 	if ( FoundInPTR != 0) {strstrGNUCLibraryhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12111: 	LinesEncountered++;
; 12112: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12113: 	if (ThunderwithR >= Strnglen-1) break;
; 12114: 	}
; 12115: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12116: }
; 12117: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12118: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12119: printf( "strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: %lu/%lu\n", strstrGNUCLibraryhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12120: printf( "strstr_GNU_C_Library performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12121: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12122: // 8]
; 12123: 
; 12124: // 9[
; 12125: clocks1 = clock();
; 12126:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12127: {
; 12128: //Search area is between Strng[0] .. Strng[n-1]
; 12129: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12130: ThunderwithL=0;ThunderwithR=0;
; 12131: 	for (;;)
; 12132: 	{
; 12133: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12134: 	FoundInPTR = Railgun_Doublet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12135: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12136: 	LinesEncountered++;
; 12137: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12138: 	if (ThunderwithR >= Strnglen-1) break;
; 12139: 	}
; 12140: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12141: }
; 12142: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12143: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12144: printf( "Railgun_Doublet_hits/Railgun_Doublet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12145: printf( "Railgun_Doublet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12146: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12147: // 9]
; 12148: 
; 12149: // +[
; 12150: clocks1 = clock();
; 12151:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12152: {
; 12153: //Search area is between Strng[0] .. Strng[n-1]
; 12154: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12155: ThunderwithL=0;ThunderwithR=0;
; 12156: 	for (;;)
; 12157: 	{
; 12158: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12159: 	FoundInPTR = Railgun_Quadruplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12160: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12161: 	LinesEncountered++;
; 12162: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12163: 	if (ThunderwithR >= Strnglen-1) break;
; 12164: 	}
; 12165: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12166: }
; 12167: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12168: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12169: printf( "Railgun_Quadruplet_hits/Railgun_Quadruplet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12170: printf( "Railgun_Quadruplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12171: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12172: // +]
; 12173: 
; 12174: 
; 12175: // Z[
; 12176: clocks1 = clock();
; 12177:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12178: {
; 12179: //Search area is between Strng[0] .. Strng[n-1]
; 12180: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12181: ThunderwithL=0;ThunderwithR=0;
; 12182: 	for (;;)
; 12183: 	{
; 12184: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12185: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12186: 	if ( FoundInPTR != NULL) {Railgun_Quadruplet_6pp_GO++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12187: 	LinesEncountered++;
; 12188: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12189: 	if (ThunderwithR >= Strnglen-1) break;
; 12190: 	}
; 12191: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12192: }
; 12193: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12194: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12195: printf( "Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %lu/%lu\n", Railgun_Quadruplet_6pp_GO>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12196: printf( "Railgun_Quadruplet_7 performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12197: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12198: // Z]
; 12199: 
; 12200: 
; 12201: 
; 12202: // Z[
; 12203: clocks1 = clock();
; 12204:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12205: {
; 12206: //Search area is between Strng[0] .. Strng[n-1]
; 12207: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12208: ThunderwithL=0;ThunderwithR=0;
; 12209: 	for (;;)
; 12210: 	{
; 12211: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12212: 	FoundInPTR = Railgun_Quadruplet_8Triplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12213: 	if ( FoundInPTR != NULL) {Railgun_Quadruplet_88++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12214: 	LinesEncountered++;
; 12215: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12216: 	if (ThunderwithR >= Strnglen-1) break;
; 12217: 	}
; 12218: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12219: }
; 12220: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12221: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12222: printf( "Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Triplet_clocks: %lu/%lu\n", Railgun_Quadruplet_88>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12223: printf( "Railgun_Quadruplet_8Triplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12224: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12225: // Z]
; 12226: 
; 12227: 
; 12228: 
; 12229: // Z[
; 12230: clocks1 = clock();
; 12231:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12232: {
; 12233: //Search area is between Strng[0] .. Strng[n-1]
; 12234: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12235: ThunderwithL=0;ThunderwithR=0;
; 12236: 	for (;;)
; 12237: 	{
; 12238: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12239: 	FoundInPTR = BNDM_32(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12240: 	if ( FoundInPTR != NULL) {BNDM32++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12241: 	LinesEncountered++;
; 12242: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12243: 	if (ThunderwithR >= Strnglen-1) break;
; 12244: 	}
; 12245: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12246: }
; 12247: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12248: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12249: printf( "BNDM_32_hits/BNDM_32_clocks: %lu/%lu\n", BNDM32>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12250: printf( "BNDM_32 performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12251: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12252: // Z]
; 12253: 
; 12254: 
; 12255: 
; 12256: 
; 12257: 
; 12258: 
; 12259: 
; 12260: // 6[
; 12261: clocks1 = clock();
; 12262:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12263: {
; 12264: //Search area is between Strng[0] .. Strng[n-1]
; 12265: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12266: ThunderwithL=0;ThunderwithR=0;
; 12267: 	for (;;)
; 12268: 	{
; 12269: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12270: 	FoundInPTR = KarpRabinKaze_BOOSTED(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12271: 	if ( FoundInPTR != NULL) {KarpRabinKaze_BOOSTEDhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12272: 	LinesEncountered++;
; 12273: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12274: 	if (ThunderwithR >= Strnglen-1) break;
; 12275: 	}
; 12276: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12277: }
; 12278: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12279: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12280: printf( "KarpRabinKaze_BOOSTED_hits/KarpRabinKaze_BOOSTED_clocks: %lu/%lu\n", KarpRabinKaze_BOOSTEDhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12281: printf( "KarpRabinKaze_BOOSTED performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12282: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12283: // 6]
; 12284: 
; 12285: // 2[
; 12286: clocks1 = clock();
; 12287:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12288: {
; 12289: //Search area is between Strng[0] .. Strng[n-1]
; 12290: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12291: ThunderwithL=0;ThunderwithR=0;
; 12292: 	for (;;)
; 12293: 	{
; 12294: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12295: 	FoundInPTR = KarpRabinKaze(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12296: 	if ( FoundInPTR != NULL) {KarpRabinKazehits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12297: 	LinesEncountered++;
; 12298: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12299: 	if (ThunderwithR >= Strnglen-1) break;
; 12300: 	}
; 12301: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12302: }
; 12303: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12304: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12305: printf( "KarpRabinKaze_hits/KarpRabinKaze_clocks: %lu/%lu\n", KarpRabinKazehits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12306: printf( "KarpRabinKaze performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12307: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12308: // 2]
; 12309: 
; 12310: // 3[
; 12311: clocks1 = clock();
; 12312:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12313: {
; 12314: //Search area is between Strng[0] .. Strng[n-1]
; 12315: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12316: ThunderwithL=0;ThunderwithR=0;
; 12317: 	for (;;)
; 12318: 	{
; 12319: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12320: 	FoundIn = Karp_Rabin(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12321: 	if ( FoundIn != -1) {KarpRabinhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+FoundIn;} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12322: 	LinesEncountered++;
; 12323: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12324: 	if (ThunderwithR >= Strnglen-1) break;
; 12325: 	}
; 12326: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12327: }
; 12328: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12329: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12330: printf( "Karp_Rabin_hits/Karp_Rabin_clocks: %lu/%lu\n", KarpRabinhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12331: printf( "Karp_Rabin performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12332: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12333: // 3]
; 12334: 
; 12335: // 1[
; 12336: clocks1 = clock();
; 12337:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12338: {
; 12339: //Search area is between Strng[0] .. Strng[n-1]
; 12340: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12341: ThunderwithL=0;ThunderwithR=0;
; 12342: 	for (;;)
; 12343: 	{
; 12344: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12345: 	FoundIn = (long)Brute_Force_Dummy(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12346: 	if ( FoundIn != -1) {BruteForceDummyhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+FoundIn;} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12347: 	LinesEncountered++;
; 12348: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12349: 	if (ThunderwithR >= Strnglen-1) break;
; 12350: 	}
; 12351: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12352: }
; 12353: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12354: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12355: printf( "Brute_Force_Dummy_hits/Brute_Force_Dummy_clocks: %lu/%lu\n", BruteForceDummyhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12356: printf( "Brute_Force_Dummy performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12357: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12358: // 1]
; 12359: 
; 12360: // 4[
; 12361: clocks1 = clock();
; 12362:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12363: {
; 12364: //Search area is between Strng[0] .. Strng[n-1]
; 12365: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12366: ThunderwithL=0;ThunderwithR=0;
; 12367: 	for (;;)
; 12368: 	{
; 12369: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12370: 	FoundIn = HORSPOOL(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12371: 	if ( FoundIn != -1) {HORSPOOLhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+FoundIn;} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12372: 	LinesEncountered++;
; 12373: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12374: 	if (ThunderwithR >= Strnglen-1) break;
; 12375: 	}
; 12376: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12377: }
; 12378: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12379: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12380: printf( "Boyer-Moore-Horspool_hits/Boyer-Moore-Horspool_clocks: %lu/%lu\n", HORSPOOLhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12381: printf( "Boyer-Moore-Horspool performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12382: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12383: // 4]
; 12384: 
; 12385: // 5[
; 12386: clocks1 = clock();
; 12387:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12388: {
; 12389: //Search area is between Strng[0] .. Strng[n-1]
; 12390: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12391: ThunderwithL=0;ThunderwithR=0;
; 12392: 	for (;;)
; 12393: 	{
; 12394: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12395: 	FoundIn = Boyer_Moore_Horspool_Kaze(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12396: 	if ( FoundIn != -1) {HORSPOOL_Kazehits++; StrnglenTRAVERSED=StrnglenTRAVERSED+FoundIn;} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12397: 	LinesEncountered++;
; 12398: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12399: 	if (ThunderwithR >= Strnglen-1) break;
; 12400: 	}
; 12401: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12402: }
; 12403: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12404: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12405: printf( "Boyer_Moore_Horspool_Kaze_hits/Boyer_Moore_Horspool_Kaze_clocks: %lu/%lu\n", HORSPOOL_Kazehits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12406: printf( "Boyer_Moore_Horspool_Kaze performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12407: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12408: // 5]
; 12409: 
; 12410: 
; 12411: LineBylinePfu:
; 12412: 
; 12413: // DUMBO ... [
; 12414: printf( "\nDUMBO 8x2 ...\n");
; 12415: for (i = 0; i<8; i++)
; 12416:    {
; 12417: for (j = 0; j<2; j++)
; 12418:    {
; 12419: 
; 12420: strcpy (Pattern, DumboBox[i][j]);
; 12421: Patternlen = strlen(&Pattern[0]);
; 12422: 
; 12423: printf( "\nSearching for Pattern('%s',%dbytes) into String(%dbytes) line-by-line ...\n\n", Pattern, Patternlen, Strnglen);
; 12424: 
; 12425: 
; 12426: // 7[
; 12427: clocks1 = clock();
; 12428:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12429: {
; 12430: strstrMicrosofthits=0;
; 12431: //Search area is between Strng[0] .. Strng[n-1]
; 12432: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12433: ThunderwithL=0;ThunderwithR=0;
; 12434: 	for (;;)
; 12435: 	{
; 12436: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12437: 	FoundInPTR = strstr_Microsoft(&Strng[ThunderwithL], &Pattern[0]);
; 12438: 	if ( FoundInPTR != NULL) {strstrMicrosofthits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12439: 	LinesEncountered++;
; 12440: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12441: 	if (ThunderwithR >= Strnglen-1) break;
; 12442: 	}
; 12443: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12444: }
; 12445: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12446: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12447: printf( "strstr_Microsoft_hits/strstr_Microsoft_clocks: %lu/%lu\n", strstrMicrosofthits, 1+((long)(TotalRoughSearchTime)>>4));
; 12448: printf( "strstr_Microsoft performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12449: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12450: // 7]
; 12451: 
; 12452: // 8[
; 12453: clocks1 = clock();
; 12454:     for (Bozan=0; Bozan < (1<<5); Bozan++) // 16 times, at end >>4
; 12455: {
; 12456: strstrGNUCLibraryhits=0;
; 12457: //Search area is between Strng[0] .. Strng[n-1]
; 12458: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12459: ThunderwithL=0;ThunderwithR=0;
; 12460: 	for (;;)
; 12461: 	{
; 12462: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12463: 	FoundInPTR = strstr_GNU_C_Library(&Strng[ThunderwithL], &Pattern[0]);
; 12464: 	if ( FoundInPTR != 0) {strstrGNUCLibraryhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12465: 	LinesEncountered++;
; 12466: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12467: 	if (ThunderwithR >= Strnglen-1) break;
; 12468: 	}
; 12469: if (Bozan != (1<<5)-1) LinesEncountered=0;
; 12470: }
; 12471: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12472: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12473: printf( "strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: %lu/%lu\n", strstrGNUCLibraryhits, 1+((long)(TotalRoughSearchTime)>>5));
; 12474: printf( "strstr_GNU_C_Library performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>5)))>>10);
; 12475: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12476: // 8]
; 12477: 
; 12478: // 9[
; 12479: clocks1 = clock();
; 12480:     for (Bozan=0; Bozan < (1<<5); Bozan++) // 16 times, at end >>4
; 12481: {
; 12482: Karp_Rabin_Kaze_4_OCTETShits=0;
; 12483: //Search area is between Strng[0] .. Strng[n-1]
; 12484: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12485: ThunderwithL=0;ThunderwithR=0;
; 12486: 	for (;;)
; 12487: 	{
; 12488: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12489: 	FoundInPTR = Railgun_Doublet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12490: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12491: 	LinesEncountered++;
; 12492: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12493: 	if (ThunderwithR >= Strnglen-1) break;
; 12494: 	}
; 12495: if (Bozan != (1<<5)-1) LinesEncountered=0;
; 12496: }
; 12497: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12498: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12499: printf( "Railgun_Doublet_hits/Railgun_Doublet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits, 1+((long)(TotalRoughSearchTime)>>5));
; 12500: printf( "Railgun_Doublet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>5)))>>10);
; 12501: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12502: // 9]
; 12503: 
; 12504: // +[
; 12505: clocks1 = clock();
; 12506:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12507: {
; 12508: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12509: //Search area is between Strng[0] .. Strng[n-1]
; 12510: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12511: ThunderwithL=0;ThunderwithR=0;
; 12512: 	for (;;)
; 12513: 	{
; 12514: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12515: 	FoundInPTR = Railgun_Quadruplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12516: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12517: 	LinesEncountered++;
; 12518: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12519: 	if (ThunderwithR >= Strnglen-1) break;
; 12520: 	}
; 12521: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12522: }
; 12523: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12524: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12525: printf( "Railgun_Quadruplet_hits/Railgun_Quadruplet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12526: printf( "Railgun_Quadruplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12527: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12528: // +]
; 12529: 
; 12530: // Z[
; 12531: clocks1 = clock();
; 12532:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12533: {
; 12534: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12535: //Search area is between Strng[0] .. Strng[n-1]
; 12536: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12537: ThunderwithL=0;ThunderwithR=0;
; 12538: 	for (;;)
; 12539: 	{
; 12540: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12541: 	FoundInPTR = Railgun_Quadruplet_6pp(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12542: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12543: 	LinesEncountered++;
; 12544: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12545: 	if (ThunderwithR >= Strnglen-1) break;
; 12546: 	}
; 12547: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12548: }
; 12549: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12550: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12551: printf( "Railgun_Quadruplet_6pp_hits/Railgun_Quadruplet_6pp_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12552: printf( "Railgun_Quadruplet_6pp performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12553: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12554: // Z]
; 12555: 
; 12556: 
; 12557: // M[
; 12558: clocks1 = clock();
; 12559:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12560: {
; 12561: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12562: //Search area is between Strng[0] .. Strng[n-1]
; 12563: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12564: ThunderwithL=0;ThunderwithR=0;
; 12565: 	for (;;)
; 12566: 	{
; 12567: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12568: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12569: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12570: 	LinesEncountered++;
; 12571: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12572: 	if (ThunderwithR >= Strnglen-1) break;
; 12573: 	}
; 12574: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12575: }
; 12576: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12577: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12578: printf( "Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12579: printf( "Railgun_Quadruplet_7 performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12580: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12581: // M]
; 12582: 
; 12583: 
; 12584: // M[
; 12585: clocks1 = clock();
; 12586:     for (Bozan=0; Bozan < (1<<5); Bozan++) // 16 times, at end >>4
; 12587: {
; 12588: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12589: //Search area is between Strng[0] .. Strng[n-1]
; 12590: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12591: ThunderwithL=0;ThunderwithR=0;
; 12592: 	for (;;)
; 12593: 	{
; 12594: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12595: 	FoundInPTR = Railgun_Quadruplet_8Triplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12596: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12597: 	LinesEncountered++;
; 12598: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12599: 	if (ThunderwithR >= Strnglen-1) break;
; 12600: 	}
; 12601: if (Bozan != (1<<5)-1) LinesEncountered=0;
; 12602: }
; 12603: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12604: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12605: printf( "Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Triplet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>5));
; 12606: printf( "Railgun_Quadruplet_8Triplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>5)))>>10);
; 12607: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12608: // M]
; 12609: 
; 12610: // M[
; 12611: clocks1 = clock();
; 12612:     for (Bozan=0; Bozan < (1<<5); Bozan++) // 16 times, at end >>4
; 12613: {
; 12614: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12615: //Search area is between Strng[0] .. Strng[n-1]
; 12616: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12617: ThunderwithL=0;ThunderwithR=0;
; 12618: 	for (;;)
; 12619: 	{
; 12620: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12621: 	FoundInPTR = Railgun_Mischa_8Triplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12622: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12623: 	LinesEncountered++;
; 12624: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12625: 	if (ThunderwithR >= Strnglen-1) break;
; 12626: 	}
; 12627: if (Bozan != (1<<5)-1) LinesEncountered=0;
; 12628: }
; 12629: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12630: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12631: printf( "Railgun_Mischa_8Triplet_hits/Railgun_Mischa_8Triplet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>5));
; 12632: printf( "Railgun_Mischa_8Triplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>5)))>>10);
; 12633: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12634: // M]
; 12635: 
; 12636: // M[
; 12637: clocks1 = clock();
; 12638:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12639: {
; 12640: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12641: //Search area is between Strng[0] .. Strng[n-1]
; 12642: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12643: ThunderwithL=0;ThunderwithR=0;
; 12644: 	for (;;)
; 12645: 	{
; 12646: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12647: 	FoundInPTR = BNDM_32(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12648: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12649: 	LinesEncountered++;
; 12650: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12651: 	if (ThunderwithR >= Strnglen-1) break;
; 12652: 	}
; 12653: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12654: }
; 12655: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12656: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12657: printf( "BNDM_32_hits/BNDM_32_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12658: printf( "BNDM_32 performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12659: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12660: // M]
; 12661: 
; 12662: 
; 12663: // M[
; 12664: clocks1 = clock();
; 12665:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12666: {
; 12667: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12668: //Search area is between Strng[0] .. Strng[n-1]
; 12669: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12670: ThunderwithL=0;ThunderwithR=0;
; 12671: 	for (;;)
; 12672: 	{
; 12673: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12674: 	FoundInPTR = Railgun_Quadruplet_7Gulliver(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12675: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12676: 	LinesEncountered++;
; 12677: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12678: 	if (ThunderwithR >= Strnglen-1) break;
; 12679: 	}
; 12680: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12681: }
; 12682: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12683: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12684: printf( "Railgun_Quadruplet_7Gulliver_hits/Railgun_Quadruplet_7Gulliver_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12685: printf( "Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12686: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12687: // M]
; 12688: 
; 12689: 
; 12690:    }
; 12691:    }
; 12692: // DUMBO ... ]
; 12693: 
; 12694: } //if (argc==1) {
; 12695: 
; 12696: //exit(1); // Comment it to get on!
; 12697: 
; 12698: return(0);
; 12699:   }

  0565a	8b 8c 24 e8 07
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2028]
  05661	33 cc		 xor	 ecx, esp
  05663	e8 00 00 00 00	 call	 @__security_check_cookie@4
  05668	81 c4 ec 07 00
	00		 add	 esp, 2028		; 000007ecH
  0566e	c3		 ret	 0
$LN580@main:
  0566f	57		 push	 edi

; 10501: //if( ( fp_inLINE = fopen( "OSHO.TXT", "rb" ) ) == NULL )
; 10502: if( ( fp_inLINE = fopen( "enwiki-20130904-pages-articles.7z.001", "rb" ) ) == NULL )

  05670	68 00 00 00 00	 push	 OFFSET $SG8265
  05675	68 00 00 00 00	 push	 OFFSET $SG8266
  0567a	e8 00 00 00 00	 call	 _fopen
  0567f	8b f8		 mov	 edi, eax
  05681	83 c4 08	 add	 esp, 8
  05684	85 ff		 test	 edi, edi
  05686	75 27		 jne	 SHORT $LN579@main

; 10503: { printf( "strstr_SHORT-SHOWDOWN: Can't open 'OSHO.TXT' file.\n" ); return( 1 ); }

  05688	68 00 00 00 00	 push	 OFFSET $SG8267
  0568d	e8 00 00 00 00	 call	 _printf

; 10630: 
; 10631: 
; 10632: 
; 10633: 
; 10634: 
; 10635: 
; 10636: 
; 10637: // As one line: [
; 10638: Railgunhits=0;
; 10639: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10640: clocks1 = clock();
; 10641:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10642: {
; 10643: //Search area is between Strng[0] .. Strng[n-1]
; 10644: 
; 10645: FoundInPTR= Railgun_Quadruplet_7sun_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10646: //printf("%s\n",FoundInPTR);
; 10647: 
; 10648: }
; 10649: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10650: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10651: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10652: printf( "Railgun_Quadruplet_7sun_hits/Railgun_Quadruplet_7sun_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10653: printf( "Railgun_Quadruplet_7sun performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10654: // As one line: ]
; 10655: 
; 10656: 
; 10657: 
; 10658: 
; 10659: 
; 10660: // As one line: [
; 10661: Railgunhits=0;
; 10662: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10663: clocks1 = clock();
; 10664:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10665: {
; 10666: //Search area is between Strng[0] .. Strng[n-1]
; 10667: 
; 10668: FoundInPTR= Railgun_Quadruplet_7_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10669: //printf("%s\n",FoundInPTR);
; 10670: 
; 10671: }
; 10672: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10673: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10674: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10675: printf( "Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10676: printf( "Railgun_Quadruplet_7 performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10677: // As one line: ]
; 10678: 
; 10679: // As one line: [
; 10680: Railgunhits=0;
; 10681: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10682: clocks1 = clock();
; 10683:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10684: {
; 10685: //Search area is between Strng[0] .. Strng[n-1]
; 10686: 
; 10687: FoundInPTR= Railgun_Quadruplet_7Trident_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10688: //printf("%s\n",FoundInPTR);
; 10689: 
; 10690: }
; 10691: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10692: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10693: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10694: printf( "Railgun_Quadruplet_7Trident_hits/Railgun_Quadruplet_7Trident_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10695: printf( "Railgun_Quadruplet_7Trident performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10696: // As one line: ]
; 10697: 
; 10698: 
; 10699: // As one line: [
; 10700: Railgunhits=0;
; 10701: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10702: clocks1 = clock();
; 10703:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10704: {
; 10705: //Search area is between Strng[0] .. Strng[n-1]
; 10706: 
; 10707: FoundInPTR= BNDM_32_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10708: //printf("%s\n",FoundInPTR);
; 10709: 
; 10710: }
; 10711: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10712: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10713: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10714: printf( "BNDM_32_hits/BNDM_32_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10715: printf( "BNDM_32 performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10716: // As one line: ]
; 10717: 
; 10718: 
; 10719: 
; 10720: // As one line: [
; 10721: Railgunhits=0;
; 10722: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10723: clocks1 = clock();
; 10724:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10725: {
; 10726: //Search area is between Strng[0] .. Strng[n-1]
; 10727: 
; 10728: FoundInPTR= Railgun_Quadruplet_7sunhorse_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10729: //printf("%s\n",FoundInPTR);
; 10730: 
; 10731: }
; 10732: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10733: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10734: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10735: printf( "Railgun_Quadruplet_7sunhorse_hits/Railgun_Quadruplet_7sunhorse_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10736: printf( "Railgun_Quadruplet_7sunhorse performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10737: // As one line: ]
; 10738: 
; 10739: 
; 10740: // As one line: [
; 10741: Railgunhits=0;
; 10742: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10743: clocks1 = clock();
; 10744:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10745: {
; 10746: //Search area is between Strng[0] .. Strng[n-1]
; 10747: 
; 10748: FoundInPTR= Railgun_Quadruplet_7deuce_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10749: //printf("%s\n",FoundInPTR);
; 10750: 
; 10751: }
; 10752: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10753: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10754: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10755: printf( "Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10756: printf( "Railgun_Quadruplet_7deuce performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10757: // As one line: ]
; 10758: 
; 10759: 
; 10760: // As one line: [
; 10761: Railgunhits=0;
; 10762: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10763: clocks1 = clock();
; 10764:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10765: {
; 10766: //Search area is between Strng[0] .. Strng[n-1]
; 10767: 
; 10768: FoundInPTR= Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10769: //printf("%s\n",FoundInPTR);
; 10770: 
; 10771: }
; 10772: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10773: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10774: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10775: printf( "Railgun_Quadruplet_7Elsiane_hits/Railgun_Quadruplet_7Elsiane_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10776: printf( "Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10777: // As one line: ]
; 10778: 
; 10779: 
; 10780: // As one line: [
; 10781: Railgunhits=0;
; 10782: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10783: clocks1 = clock();
; 10784:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10785: {
; 10786: //Search area is between Strng[0] .. Strng[n-1]
; 10787: 
; 10788: FoundInPTR= Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10789: //printf("%s\n",FoundInPTR);
; 10790: 
; 10791: }
; 10792: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10793: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10794: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10795: printf( "Railgun_Quadruplet_7Gulliver_hits/Railgun_Quadruplet_7Gulliver_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10796: printf( "Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10797: // As one line: ]
; 10798: 
; 10799: 
; 10800: 
; 10801: // As one line: [
; 10802: Railgunhits=0;
; 10803: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10804: clocks1 = clock();
; 10805:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10806: {
; 10807: //Search area is between Strng[0] .. Strng[n-1]
; 10808: 
; 10809: FoundInPTR= Railgun_Quadruplet_7Hasherezade_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10810: //printf("%s\n",FoundInPTR);
; 10811: 
; 10812: }
; 10813: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10814: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10815: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10816: printf( "Railgun_Quadruplet_7Hasherezade_hits/Railgun_Quadruplet_7Hasherezade_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10817: printf( "Railgun_Quadruplet_7Hasherezade performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10818: // As one line: ]
; 10819: 
; 10820: 
; 10821: 
; 10822: 
; 10823: 
; 10824: // As one line: [
; 10825: Railgunhits=0;
; 10826: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10827: clocks1 = clock();
; 10828:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10829: {
; 10830: //Search area is between Strng[0] .. Strng[n-1]
; 10831: 
; 10832: FoundInPTR= Boyer_Moore_Flensburg(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10833: //printf("%s\n",FoundInPTR);
; 10834: 
; 10835: }
; 10836: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10837: //printf( "Bozan_hits/Bozan_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10838: //printf( "Bozan performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10839: printf( "Boyer_Moore_Flensburg_hits/Boyer_Moore_Flensburg_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10840: printf( "Boyer_Moore_Flensburg performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10841: // As one line: ]
; 10842: 
; 10843: 
; 10844: 
; 10845: 
; 10846: 
; 10847: // As one line: [
; 10848: Railgunhits=0;
; 10849: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10850: clocks1 = clock();
; 10851:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10852: {
; 10853: //Search area is between Strng[0] .. Strng[n-1]
; 10854: 
; 10855: FoundInPTR= TW(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10856: //printf("%s\n",FoundInPTR);
; 10857: 
; 10858: }
; 10859: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10860: printf( "Two-Way_hits/Two-Way_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10861: printf( "Two-Way performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10862: // As one line: ]
; 10863: 
; 10864: exit(0);
; 10865: 
; 10866: 
; 10867: 
; 10868: 
; 10869: if (argc==1) {
; 10870: 
; 10871: goto zzzzzzzzzzzzzzzzz;
; 10872: 
; 10873: // As one line: [
; 10874: Railgunhits=0;
; 10875: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10876: clocks1 = clock();
; 10877:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10878: {
; 10879: //Search area is between Strng[0] .. Strng[n-1]
; 10880: 
; 10881: 	FoundInPTR = TW(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10882: //printf("%s\n",FoundInPTR);
; 10883: 
; 10884: }
; 10885: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10886: printf( "TW_hits/TW_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10887: printf( "TW performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10888: // As one line: ]
; 10889: 
; 10890: 
; 10891: 
; 10892: 
; 10893: // As one line: [
; 10894: Railgunhits=0;
; 10895: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10896: clocks1 = clock();
; 10897:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10898: {
; 10899: //Search area is between Strng[0] .. Strng[n-1]
; 10900: 
; 10901: 	dummy = HORSPOOL_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10902: 
; 10903: }
; 10904: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10905: printf( "BM_HORSPOOL_hits/BM_HORSPOOL_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10906: printf( "BM_HORSPOOL performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10907: // As one line: ]
; 10908: 
; 10909: 
; 10910: 
; 10911: // As one line: [
; 10912: Railgunhits=0;
; 10913: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10914: clocks1 = clock();
; 10915:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10916: {
; 10917: //Search area is between Strng[0] .. Strng[n-1]
; 10918: 
; 10919: 	FoundInPTR = Railgun_totalhits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10920: 
; 10921: }
; 10922: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10923: printf( "Railgun_hits/Railgun_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10924: printf( "Railgun performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10925: // As one line: ]
; 10926: 
; 10927: zzzzzzzzzzzzzzzzz:
; 10928: 
; 10929: // As one line: [
; 10930: Railgunhits=0;
; 10931: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10932: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");
; 10933: clocks1 = clock();
; 10934:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10935: {
; 10936: //Search area is between Strng[0] .. Strng[n-1]
; 10937: 
; 10938: 	FoundInPTR = Railgun_Quadruplet_6pp_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10939: 
; 10940: }
; 10941: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10942: printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10943: printf( "Railgun_6pp performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10944: // As one line: ]
; 10945: 
; 10946: 
; 10947: 
; 10948: // As one line: [
; 10949: Railgunhits=0;
; 10950: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10951: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");
; 10952: clocks1 = clock();
; 10953:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10954: {
; 10955: //Search area is between Strng[0] .. Strng[n-1]
; 10956: 
; 10957: 	FoundInPTR = Railgun_Quadruplet_7deuce_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10958: 
; 10959: }
; 10960: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10961: printf( "Railgun_Quadruplet_7deuce_hits/Railgun_Quadruplet_7deuce_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10962: printf( "Railgun_Quadruplet_7deuce performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10963: // As one line: ]
; 10964: 
; 10965: 
; 10966: 
; 10967: // As one line: [
; 10968: Railgunhits=0;
; 10969: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);
; 10970: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");
; 10971: clocks1 = clock();
; 10972:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10973: {
; 10974: //Search area is between Strng[0] .. Strng[n-1]
; 10975: 
; 10976: 	FoundInPTR = Railgun_Quadruplet_7_count_hits(&Strng[0], &Pattern[0], Strnglen, Patternlen);
; 10977: 
; 10978: }
; 10979: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 10980: printf( "Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 10981: printf( "Railgun_Quadruplet_7 performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 10982: // As one line: ]
; 10983: 
; 10984: 
; 10985: 
; 10986: 
; 10987: 
; 10988: 
; 10989: 
; 10990: 
; 10991: } //if (argc==1) {
; 10992: 
; 10993: 
; 10994: // NEW TEST APPROACH HERE - the old BMH loop of Railgun_Quadruplet_6pp is 67 bytes long whereas the new Railgun_Quadruplet_7mm has 61 i.e. under 64. [
; 10995: // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; 10996: 
; 10997: printf( "\nNote: Executing the next two tests 256 times i.e. the search is for 256x8x2 patterns!\n");
; 10998: 
; 10999: ReallyTraversed=0;
; 11000: // As one line: [
; 11001: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ... Not-Counting-Hits-Just-Returns-First-One\n", Strnglen);
; 11002: clocks1 = clock();
; 11003:     for (Bozan=0; Bozan < (1<<8); Bozan++) // 16 times, at end >>4
; 11004: {
; 11005: //Search area is between Strng[0] .. Strng[n-1]
; 11006: 
; 11007: for (i = 0; i<8; i++)
; 11008:    {
; 11009: Railgunhits=0;
; 11010: clocks3 = clock();
; 11011: 	FoundInPTR = Railgun_Quadruplet_6pp(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11012: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11013: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11014: clocks4 = clock();
; 11015: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11016:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", DumboBox[i][0], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11017: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", DumboBox[i][0], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11018:                        }
; 11019: Railgunhits=0;
; 11020: clocks3 = clock();
; 11021: 	FoundInPTR = Railgun_Quadruplet_6pp(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11022: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11023: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11024: clocks4 = clock();
; 11025: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11026:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", DumboBox[i][1], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11027: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", DumboBox[i][1], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11028: 
; 11029:                        }
; 11030:    }
; 11031: }
; 11032: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11033: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11034: printf( "Railgun_Quadruplet_6pp 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)ReallyTraversed/((long)(TotalRoughSearchTime)))>>10);
; 11035: printf( "ReallyTraversed: %s bytes\n", _ui64toaKAZEcomma(ReallyTraversed, llTOaDigits, 10));
; 11036: // As one line: ]
; 11037: 
; 11038: 
; 11039: ReallyTraversed=0;
; 11040: // As one line: [
; 11041: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ... Not-Counting-Hits-Just-Returns-First-One\n", Strnglen);
; 11042: clocks1 = clock();
; 11043:     for (Bozan=0; Bozan < (1<<8); Bozan++) // 16 times, at end >>4
; 11044: {
; 11045: //Search area is between Strng[0] .. Strng[n-1]
; 11046: 
; 11047: for (i = 0; i<8; i++)
; 11048:    {
; 11049: Railgunhits=0;
; 11050: clocks3 = clock();
; 11051: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11052: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11053: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11054: clocks4 = clock();
; 11055: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11056:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][0], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11057: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][0], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11058:                        }
; 11059: Railgunhits=0;
; 11060: clocks3 = clock();
; 11061: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11062: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11063: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11064: clocks4 = clock();
; 11065: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11066:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][1], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11067: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][1], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11068:                        }
; 11069:    }
; 11070: }
; 11071: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11072: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11073: printf( "Railgun_Quadruplet_7 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)ReallyTraversed/((long)(TotalRoughSearchTime)))>>10);
; 11074: printf( "ReallyTraversed: %s bytes\n", _ui64toaKAZEcomma(ReallyTraversed, llTOaDigits, 10));
; 11075: // As one line: ]
; 11076: 
; 11077: // ====================================================================================================================
; 11078: 
; 11079: printf( "\nNote: Executing the next two tests 256 times i.e. the search is for 256x52 patterns, all utilizing BMH!\n");
; 11080: 
; 11081: 
; 11082: ReallyTraversed=0;
; 11083: // As one line: [
; 11084: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ... Not-Counting-Hits-Just-Returns-First-One\n", Strnglen);
; 11085: clocks1 = clock();
; 11086:     for (Bozan=0; Bozan < (1<<8); Bozan++) // 16 times, at end >>4
; 11087: {
; 11088: //Search area is between Strng[0] .. Strng[n-1]
; 11089: 
; 11090: for (i = 0; i<52; i++)
; 11091:    {
; 11092: Railgunhits=0;
; 11093: clocks3 = clock();
; 11094: 	FoundInPTR = Railgun_Quadruplet_6pp(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11095: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11096: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11097: clocks4 = clock();
; 11098: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11099:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", Dumbino[i], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11100: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_6pp performance: %luKB/clock\n", Dumbino[i], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11101:                        }
; 11102:    }
; 11103: }
; 11104: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11105: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11106: printf( "Railgun_Quadruplet_6pp 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)ReallyTraversed/((long)(TotalRoughSearchTime)))>>10);
; 11107: printf( "TotalRoughSearchTime: %s clocks\n", _ui64toaKAZEcomma(TotalRoughSearchTime, llTOaDigits, 10));
; 11108: printf( "ReallyTraversed: %s bytes\n", _ui64toaKAZEcomma(ReallyTraversed, llTOaDigits, 10));
; 11109: // As one line: ]
; 11110: 
; 11111: 
; 11112: 
; 11113: ReallyTraversed=0;
; 11114: // As one line: [
; 11115: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ... Not-Counting-Hits-Just-Returns-First-One\n", Strnglen);
; 11116: clocks1 = clock();
; 11117:     for (Bozan=0; Bozan < (1<<8); Bozan++) // 16 times, at end >>4
; 11118: {
; 11119: //Search area is between Strng[0] .. Strng[n-1]
; 11120: 
; 11121: for (i = 0; i<52; i++)
; 11122:    {
; 11123: Railgunhits=0;
; 11124: clocks3 = clock();
; 11125: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11126: if ((long)(FoundInPTR-&Strng[0])>=0) ReallyTraversed=ReallyTraversed+(long)(FoundInPTR-&Strng[0])+1;
; 11127: else ReallyTraversed=ReallyTraversed+Strnglen;
; 11128: clocks4 = clock();
; 11129: if (Bozan == (1<<8)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11130:                          if ((long)(FoundInPTR-&Strng[0])>=0) printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", Dumbino[i], FoundInPTR-&Strng[0], ((long)(FoundInPTR-&Strng[0])/((long)(TotalRoughSearchTime)))>>10);
; 11131: 			 else printf( "Found ('%s') at %d position, Railgun_Quadruplet_7 performance: %luKB/clock\n", Dumbino[i], FoundInPTR-&Strng[0], (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11132:                        }
; 11133:    }
; 11134: }
; 11135: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11136: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11137: printf( "Railgun_Quadruplet_7 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)ReallyTraversed/((long)(TotalRoughSearchTime)))>>10);
; 11138: printf( "TotalRoughSearchTime: %s clocks\n", _ui64toaKAZEcomma(TotalRoughSearchTime, llTOaDigits, 10));
; 11139: printf( "ReallyTraversed: %s bytes\n", _ui64toaKAZEcomma(ReallyTraversed, llTOaDigits, 10));
; 11140: // As one line: ]
; 11141: 
; 11142: 
; 11143: // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; 11144: // NEW TEST APPROACH HERE - the old BMH loop of Railgun_Quadruplet_6pp is 67 bytes long whereas the new Railgun_Quadruplet_7mm has 61 i.e. under 64. ]
; 11145: 
; 11146: 
; 11147: 
; 11148: 
; 11149: 
; 11150: SlowerButStronger:
; 11151: goto QuickToHits;
; 11152: 
; 11153: 
; 11154: 
; 11155: // As one line: [
; 11156: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11157: clocks1 = clock();
; 11158:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11159: {
; 11160: //Search area is between Strng[0] .. Strng[n-1]
; 11161: 
; 11162: for (i = 0; i<8; i++)
; 11163:    {
; 11164: Railgunhits=0;
; 11165: clocks3 = clock();
; 11166: 	dummy = HORSPOOL_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11167: clocks4 = clock();
; 11168: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11169:                          printf( "Found ('%s') %d time(s), BM_HORSPOOL performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11170:                        }
; 11171: Railgunhits=0;
; 11172: clocks3 = clock();
; 11173: 	dummy = HORSPOOL_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11174: clocks4 = clock();
; 11175: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11176:                          printf( "Found ('%s') %d time(s), BM_HORSPOOL performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11177:                        }
; 11178:    }
; 11179: }
; 11180: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11181: //printf( "BM_HORSPOOL_hits/BM_HORSPOOL_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11182: printf( "BM_HORSPOOL 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11183: // As one line: ]
; 11184: 
; 11185: 
; 11186: /*
; 11187: // As one line: [
; 11188: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11189: clocks1 = clock();
; 11190:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11191: {
; 11192: //Search area is between Strng[0] .. Strng[n-1]
; 11193: 
; 11194: for (i = 0; i<8; i++)
; 11195:    {
; 11196: Railgunhits=0;
; 11197: clocks3 = clock();
; 11198: 	FoundInPTR = TW(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11199: clocks4 = clock();
; 11200: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11201:                          printf( "Found ('%s') %d time(s), TW performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11202:                        }
; 11203: Railgunhits=0;
; 11204: clocks3 = clock();
; 11205: 	FoundInPTR = TW(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11206: clocks4 = clock();
; 11207: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11208:                          printf( "Found ('%s') %d time(s), TW performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11209:                        }
; 11210:    }
; 11211: }
; 11212: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11213: //printf( "Two-way_hits/Two-way_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11214: printf( "TW 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11215: // As one line: ]
; 11216: */
; 11217: 
; 11218: 
; 11219: 
; 11220: 
; 11221: // As one line: [
; 11222: printf( "\nDoing Search for 8x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11223: clocks1 = clock();
; 11224:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11225: {
; 11226: //Search area is between Strng[0] .. Strng[n-1]
; 11227: 
; 11228: for (i = 0; i<8; i++)
; 11229:    {
; 11230: Railgunhits=0;
; 11231: clocks3 = clock();
; 11232: 	FoundInPTR = Railgun_Quadruplet_6pp_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11233: clocks4 = clock();
; 11234: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11235:                          printf( "Found ('%s') %d time(s), Railgun_6pp performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11236:                        }
; 11237: Railgunhits=0;
; 11238: clocks3 = clock();
; 11239: 	FoundInPTR = Railgun_Quadruplet_6pp_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11240: clocks4 = clock();
; 11241: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11242:                          printf( "Found ('%s') %d time(s), Railgun_6pp performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11243:                        }
; 11244:    }
; 11245: }
; 11246: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11247: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11248: printf( "Railgun_6pp 8x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11249: // As one line: ]
; 11250: 
; 11251: 
; 11252: 
; 11253: QuickToHits:
; 11254: 
; 11255: 
; 11256: 
; 11257: 
; 11258: 
; 11259: 
; 11260: GlobalSP = 0;
; 11261: GlobalI = 0;
; 11262: 
; 11263: // As one line: [
; 11264: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11265: clocks1 = clock();
; 11266:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11267: {
; 11268: //Search area is between Strng[0] .. Strng[n-1]
; 11269: 
; 11270: for (i = 0+2; i<8; i++)
; 11271:    {
; 11272: Railgunhits=0;
; 11273: clocks3 = clock();
; 11274: 	FoundInPTR = Railgun_Quadruplet_7sun_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11275: clocks4 = clock();
; 11276: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11277:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sun performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11278:                        }
; 11279: Railgunhits=0;
; 11280: clocks3 = clock();
; 11281: 	FoundInPTR = Railgun_Quadruplet_7sun_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11282: clocks4 = clock();
; 11283: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11284:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sun performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11285:                        }
; 11286:    }
; 11287: }
; 11288: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11289: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11290: printf( "Railgun_Quadruplet_7sun 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11291: // As one line: ]
; 11292: 
; 11293: printf( "Railgun_Quadruplet_7sun 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11294: 
; 11295: 
; 11296: GlobalSP = 0;
; 11297: GlobalI = 0;
; 11298: 
; 11299: // As one line: [
; 11300: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11301: clocks1 = clock();
; 11302:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11303: {
; 11304: //Search area is between Strng[0] .. Strng[n-1]
; 11305: 
; 11306: for (i = 0+2; i<8; i++)
; 11307:    {
; 11308: Railgunhits=0;
; 11309: clocks3 = clock();
; 11310: 	FoundInPTR = Railgun_Quadruplet_7_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11311: clocks4 = clock();
; 11312: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11313:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11314:                        }
; 11315: Railgunhits=0;
; 11316: clocks3 = clock();
; 11317: 	FoundInPTR = Railgun_Quadruplet_7_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11318: clocks4 = clock();
; 11319: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11320:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7 performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11321:                        }
; 11322:    }
; 11323: }
; 11324: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11325: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11326: printf( "Railgun_Quadruplet_7 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11327: // As one line: ]
; 11328: 
; 11329: printf( "Railgun_Quadruplet_7 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11330: 
; 11331: 
; 11332: 
; 11333: 
; 11334: 
; 11335: 
; 11336: GlobalSP = 0;
; 11337: GlobalI = 0;
; 11338: 
; 11339: // As one line: [
; 11340: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11341: clocks1 = clock();
; 11342:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11343: {
; 11344: //Search area is between Strng[0] .. Strng[n-1]
; 11345: 
; 11346: for (i = 0+2; i<8; i++)
; 11347:    {
; 11348: Railgunhits=0;
; 11349: clocks3 = clock();
; 11350: 	FoundInPTR = BNDM_32_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11351: clocks4 = clock();
; 11352: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11353:                          printf( "Found ('%s') %d time(s), BNDM_32 performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11354:                        }
; 11355: Railgunhits=0;
; 11356: clocks3 = clock();
; 11357: 	FoundInPTR = BNDM_32_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11358: clocks4 = clock();
; 11359: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11360:                          printf( "Found ('%s') %d time(s), BNDM_32 performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11361:                        }
; 11362:    }
; 11363: }
; 11364: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11365: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11366: printf( "BNDM_32 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11367: // As one line: ]
; 11368: 
; 11369: printf( "BNDM_32 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11370: 
; 11371: 
; 11372: 
; 11373: 
; 11374: 
; 11375: 
; 11376: 
; 11377: 
; 11378: 
; 11379: 
; 11380: 
; 11381: 
; 11382: 
; 11383: 
; 11384: 
; 11385: 
; 11386: 
; 11387: 
; 11388: GlobalSP = 0;
; 11389: GlobalI = 0;
; 11390: 
; 11391: // As one line: [
; 11392: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11393: clocks1 = clock();
; 11394:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11395: {
; 11396: //Search area is between Strng[0] .. Strng[n-1]
; 11397: 
; 11398: for (i = 0+2; i<8; i++)
; 11399:    {
; 11400: Railgunhits=0;
; 11401: clocks3 = clock();
; 11402: 	FoundInPTR = Railgun_Quadruplet_7sunhorse_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11403: clocks4 = clock();
; 11404: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11405:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sunhorse performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11406:                        }
; 11407: Railgunhits=0;
; 11408: clocks3 = clock();
; 11409: 	FoundInPTR = Railgun_Quadruplet_7sunhorse_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11410: clocks4 = clock();
; 11411: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11412:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sunhorse performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11413:                        }
; 11414:    }
; 11415: }
; 11416: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11417: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11418: printf( "Railgun_Quadruplet_7sunhorse 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11419: // As one line: ]
; 11420: 
; 11421: printf( "Railgun_Quadruplet_7sunhorse 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11422: 
; 11423: 
; 11424: 
; 11425: GlobalSP = 0;
; 11426: GlobalI = 0;
; 11427: 
; 11428: // As one line: [
; 11429: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11430: clocks1 = clock();
; 11431:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11432: {
; 11433: //Search area is between Strng[0] .. Strng[n-1]
; 11434: 
; 11435: for (i = 0+2; i<8; i++)
; 11436:    {
; 11437: Railgunhits=0;
; 11438: clocks3 = clock();
; 11439: 	FoundInPTR = Railgun_Quadruplet_7deuce_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11440: clocks4 = clock();
; 11441: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11442:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7deuce performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11443:                        }
; 11444: Railgunhits=0;
; 11445: clocks3 = clock();
; 11446: 	FoundInPTR = Railgun_Quadruplet_7deuce_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11447: clocks4 = clock();
; 11448: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11449:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7deuce performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11450:                        }
; 11451:    }
; 11452: }
; 11453: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11454: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11455: printf( "Railgun_Quadruplet_7deuce 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11456: // As one line: ]
; 11457: 
; 11458: printf( "Railgun_Quadruplet_7deuce 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11459: 
; 11460: 
; 11461: 
; 11462: GlobalSP = 0;
; 11463: GlobalI = 0;
; 11464: 
; 11465: // As one line: [
; 11466: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11467: clocks1 = clock();
; 11468:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11469: {
; 11470: //Search area is between Strng[0] .. Strng[n-1]
; 11471: 
; 11472: for (i = 0+2; i<8; i++)
; 11473:    {
; 11474: Railgunhits=0;
; 11475: clocks3 = clock();
; 11476: 	FoundInPTR = Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11477: clocks4 = clock();
; 11478: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11479:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11480:                        }
; 11481: Railgunhits=0;
; 11482: clocks3 = clock();
; 11483: 	FoundInPTR = Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11484: clocks4 = clock();
; 11485: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11486:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11487:                        }
; 11488:    }
; 11489: }
; 11490: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11491: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11492: printf( "Railgun_Quadruplet_7Elsiane 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11493: // As one line: ]
; 11494: 
; 11495: printf( "Railgun_Quadruplet_7Elsiane 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11496: 
; 11497: 
; 11498: 
; 11499: GlobalSP = 0;
; 11500: GlobalI = 0;
; 11501: 
; 11502: // As one line: [
; 11503: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11504: clocks1 = clock();
; 11505:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11506: {
; 11507: //Search area is between Strng[0] .. Strng[n-1]
; 11508: 
; 11509: for (i = 0+2; i<8; i++)
; 11510:    {
; 11511: Railgunhits=0;
; 11512: clocks3 = clock();
; 11513: 	FoundInPTR = Boyer_Moore_Flensburg(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11514: clocks4 = clock();
; 11515: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11516:                          printf( "Found ('%s') %d time(s), Boyer_Moore_Flensburg performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11517:                        }
; 11518: Railgunhits=0;
; 11519: clocks3 = clock();
; 11520: 	FoundInPTR = Boyer_Moore_Flensburg(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11521: clocks4 = clock();
; 11522: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11523:                          printf( "Found ('%s') %d time(s), Boyer_Moore_Flensburg performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11524:                        }
; 11525:    }
; 11526: }
; 11527: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11528: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11529: printf( "Boyer_Moore_Flensburg 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11530: // As one line: ]
; 11531: 
; 11532: printf( "Boyer_Moore_Flensburg 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11533: 
; 11534: 
; 11535: 
; 11536: 
; 11537: GlobalSP = 0;
; 11538: GlobalI = 0;
; 11539: 
; 11540: // As one line: [
; 11541: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11542: clocks1 = clock();
; 11543:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11544: {
; 11545: //Search area is between Strng[0] .. Strng[n-1]
; 11546: 
; 11547: for (i = 0+2; i<8; i++)
; 11548:    {
; 11549: Railgunhits=0;
; 11550: clocks3 = clock();
; 11551: 	FoundInPTR = Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11552: clocks4 = clock();
; 11553: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11554:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11555:                        }
; 11556: Railgunhits=0;
; 11557: clocks3 = clock();
; 11558: 	FoundInPTR = Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11559: clocks4 = clock();
; 11560: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11561:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11562:                        }
; 11563:    }
; 11564: }
; 11565: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11566: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11567: printf( "Railgun_Quadruplet_7Gulliver 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11568: // As one line: ]
; 11569: 
; 11570: printf( "Railgun_Quadruplet_7Gulliver 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11571: 
; 11572: 
; 11573: 
; 11574: GlobalSP = 0;
; 11575: GlobalI = 0;
; 11576: 
; 11577: // As one line: [
; 11578: printf( "\nDoing Search for 6x2 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11579: clocks1 = clock();
; 11580:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11581: {
; 11582: //Search area is between Strng[0] .. Strng[n-1]
; 11583: 
; 11584: for (i = 0+2; i<8; i++)
; 11585:    {
; 11586: Railgunhits=0;
; 11587: clocks3 = clock();
; 11588: 	FoundInPTR = Brute_Force_Dummy(&Strng[0], DumboBox[i][0], Strnglen, strlen(DumboBox[i][0]));
; 11589: clocks4 = clock();
; 11590: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11591:                          printf( "Found ('%s') %d time(s), Brute_Force_Dummy performance: %luKB/clock\n", DumboBox[i][0], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11592:                        }
; 11593: Railgunhits=0;
; 11594: clocks3 = clock();
; 11595: 	FoundInPTR = Brute_Force_Dummy(&Strng[0], DumboBox[i][1], Strnglen, strlen(DumboBox[i][1]));
; 11596: clocks4 = clock();
; 11597: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11598:                          printf( "Found ('%s') %d time(s), Brute_Force_Dummy performance: %luKB/clock\n", DumboBox[i][1], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11599:                        }
; 11600:    }
; 11601: }
; 11602: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11603: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11604: printf( "Brute_Force_Dummy 6x2 i.e. average performance: %luKB/clock\n", ((unsigned long long)8*2*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11605: // As one line: ]
; 11606: 
; 11607: printf( "Brute_Force_Dummy 6x2 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11608: 
; 11609: 
; 11610: 
; 11611: 
; 11612: // [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
; 11613: 
; 11614: 
; 11615: GlobalSP = 0;
; 11616: GlobalI = 0;
; 11617: 
; 11618: // As one line: [
; 11619: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11620: clocks1 = clock();
; 11621:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11622: {
; 11623: //Search area is between Strng[0] .. Strng[n-1]
; 11624: 
; 11625: for (i = 0; i<25; i++)
; 11626:    {
; 11627: Railgunhits=0;
; 11628: clocks3 = clock();
; 11629: 	FoundInPTR = Railgun_Quadruplet_7sun_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11630: clocks4 = clock();
; 11631: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11632:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sun performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11633:                        }
; 11634:    }
; 11635: }
; 11636: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11637: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11638: printf( "Railgun_Quadruplet_7sun 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11639: // As one line: ]
; 11640: 
; 11641: printf( "Railgun_Quadruplet_7sun 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11642: 
; 11643: 
; 11644: GlobalSP = 0;
; 11645: GlobalI = 0;
; 11646: 
; 11647: // As one line: [
; 11648: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11649: clocks1 = clock();
; 11650:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11651: {
; 11652: //Search area is between Strng[0] .. Strng[n-1]
; 11653: 
; 11654: for (i = 0; i<25; i++)
; 11655:    {
; 11656: Railgunhits=0;
; 11657: clocks3 = clock();
; 11658: 	FoundInPTR = Railgun_Quadruplet_7Trident_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11659: clocks4 = clock();
; 11660: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11661:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Trident performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11662:                        }
; 11663:    }
; 11664: }
; 11665: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11666: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11667: printf( "Railgun_Quadruplet_7Trident 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11668: // As one line: ]
; 11669: 
; 11670: printf( "Railgun_Quadruplet_7Trident 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11671: 
; 11672: 
; 11673: GlobalSP = 0;
; 11674: GlobalI = 0;
; 11675: 
; 11676: // As one line: [
; 11677: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11678: clocks1 = clock();
; 11679:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11680: {
; 11681: //Search area is between Strng[0] .. Strng[n-1]
; 11682: 
; 11683: for (i = 0; i<25; i++)
; 11684:    {
; 11685: Railgunhits=0;
; 11686: clocks3 = clock();
; 11687: 	FoundInPTR = BNDM_32_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11688: clocks4 = clock();
; 11689: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11690:                          printf( "Found ('%s') %d time(s), BNDM performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11691:                        }
; 11692:    }
; 11693: }
; 11694: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11695: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11696: printf( "BNDM 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11697: // As one line: ]
; 11698: 
; 11699: printf( "BNDM 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11700: 
; 11701: 
; 11702: 
; 11703: GlobalSP = 0;
; 11704: GlobalI = 0;
; 11705: 
; 11706: // As one line: [
; 11707: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11708: clocks1 = clock();
; 11709:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11710: {
; 11711: //Search area is between Strng[0] .. Strng[n-1]
; 11712: 
; 11713: for (i = 0; i<25; i++)
; 11714:    {
; 11715: Railgunhits=0;
; 11716: clocks3 = clock();
; 11717: 	FoundInPTR = Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11718: clocks4 = clock();
; 11719: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11720:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11721:                        }
; 11722:    }
; 11723: }
; 11724: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11725: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11726: printf( "Railgun_Quadruplet_7Elsiane 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11727: // As one line: ]
; 11728: 
; 11729: printf( "Railgun_Quadruplet_7Elsiane 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11730: 
; 11731: 
; 11732: GlobalSP = 0;
; 11733: GlobalI = 0;
; 11734: 
; 11735: // As one line: [
; 11736: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11737: clocks1 = clock();
; 11738:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11739: {
; 11740: //Search area is between Strng[0] .. Strng[n-1]
; 11741: 
; 11742: for (i = 0; i<25; i++)
; 11743:    {
; 11744: Railgunhits=0;
; 11745: clocks3 = clock();
; 11746: 	FoundInPTR = Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11747: clocks4 = clock();
; 11748: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11749:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11750:                        }
; 11751:    }
; 11752: }
; 11753: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11754: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11755: printf( "Railgun_Quadruplet_7Gulliver 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11756: // As one line: ]
; 11757: 
; 11758: printf( "Railgun_Quadruplet_7Gulliver 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11759: 
; 11760: 
; 11761: GlobalSP = 0;
; 11762: GlobalI = 0;
; 11763: 
; 11764: // As one line: [
; 11765: printf( "\nDoing Search for 25 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11766: clocks1 = clock();
; 11767:     for (Bozan=0; Bozan < (1<<6); Bozan++) // 64 times, at end >>6
; 11768: {
; 11769: //Search area is between Strng[0] .. Strng[n-1]
; 11770: 
; 11771: for (i = 0; i<25; i++)
; 11772:    {
; 11773: Railgunhits=0;
; 11774: clocks3 = clock();
; 11775: 	FoundInPTR = Railgun_Quadruplet_7Hasherezade_count_hits(&Strng[0], BULLY12to48[i], Strnglen, strlen(BULLY12to48[i]));
; 11776: clocks4 = clock();
; 11777: if (Bozan == (1<<6)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11778:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Hasherezade performance: %luKB/clock\n", BULLY12to48[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11779:                        }
; 11780:    }
; 11781: }
; 11782: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11783: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11784: printf( "Railgun_Quadruplet_7Hasherezade 25 i.e. average performance: %luKB/clock\n", ((unsigned long long)25*Strnglen/(1+((long)(TotalRoughSearchTime)>>6)))>>10);
; 11785: // As one line: ]
; 11786: 
; 11787: printf( "Railgun_Quadruplet_7Hasherezade 25 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11788: 
; 11789: 
; 11790: 
; 11791: // ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
; 11792: 
; 11793: 
; 11794: 
; 11795: 
; 11796: 
; 11797: 
; 11798: 
; 11799: 
; 11800: 
; 11801: 
; 11802: 
; 11803: 
; 11804: 
; 11805: 
; 11806: 
; 11807: 
; 11808: 
; 11809: 
; 11810: 
; 11811: 
; 11812: GlobalSP = 0;
; 11813: GlobalI = 0;
; 11814: 
; 11815: // As one line: [
; 11816: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11817: clocks1 = clock();
; 11818:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11819: {
; 11820: //Search area is between Strng[0] .. Strng[n-1]
; 11821: 
; 11822: for (i = 0; i<52; i++)
; 11823:    {
; 11824: Railgunhits=0;
; 11825: clocks3 = clock();
; 11826: 	FoundInPTR = Railgun_Quadruplet_7sun_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11827: clocks4 = clock();
; 11828: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11829:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sun performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11830:                        }
; 11831:    }
; 11832: }
; 11833: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11834: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11835: printf( "Railgun_Quadruplet_7sun 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11836: // As one line: ]
; 11837: 
; 11838: printf( "Railgun_Quadruplet_7sun 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11839: 
; 11840: 
; 11841: GlobalSP = 0;
; 11842: GlobalI = 0;
; 11843: 
; 11844: // As one line: [
; 11845: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11846: clocks1 = clock();
; 11847:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11848: {
; 11849: //Search area is between Strng[0] .. Strng[n-1]
; 11850: 
; 11851: for (i = 0; i<52; i++)
; 11852:    {
; 11853: Railgunhits=0;
; 11854: clocks3 = clock();
; 11855: 	FoundInPTR = Railgun_Quadruplet_7_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11856: clocks4 = clock();
; 11857: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11858:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7 performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11859:                        }
; 11860:    }
; 11861: }
; 11862: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11863: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11864: printf( "Railgun_Quadruplet_7 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11865: // As one line: ]
; 11866: 
; 11867: printf( "Railgun_Quadruplet_7 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11868: 
; 11869: 
; 11870: 
; 11871: GlobalSP = 0;
; 11872: GlobalI = 0;
; 11873: 
; 11874: // As one line: [
; 11875: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11876: clocks1 = clock();
; 11877:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11878: {
; 11879: //Search area is between Strng[0] .. Strng[n-1]
; 11880: 
; 11881: for (i = 0; i<52; i++)
; 11882:    {
; 11883: Railgunhits=0;
; 11884: clocks3 = clock();
; 11885: 	FoundInPTR = Railgun_Quadruplet_7sunhorse_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11886: clocks4 = clock();
; 11887: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11888:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7sunhorse performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11889:                        }
; 11890:    }
; 11891: }
; 11892: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11893: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11894: printf( "Railgun_Quadruplet_7sunhorse 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11895: // As one line: ]
; 11896: 
; 11897: printf( "Railgun_Quadruplet_7sunhorse 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11898: 
; 11899: 
; 11900: GlobalSP = 0;
; 11901: GlobalI = 0;
; 11902: 
; 11903: // As one line: [
; 11904: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11905: clocks1 = clock();
; 11906:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11907: {
; 11908: //Search area is between Strng[0] .. Strng[n-1]
; 11909: 
; 11910: for (i = 0; i<52; i++)
; 11911:    {
; 11912: Railgunhits=0;
; 11913: clocks3 = clock();
; 11914: 	FoundInPTR = Railgun_Quadruplet_7deuce_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11915: clocks4 = clock();
; 11916: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11917:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7deuce performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11918:                        }
; 11919:    }
; 11920: }
; 11921: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11922: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11923: printf( "Railgun_Quadruplet_7deuce 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11924: // As one line: ]
; 11925: 
; 11926: printf( "Railgun_Quadruplet_7deuce 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11927: 
; 11928: 
; 11929: GlobalSP = 0;
; 11930: GlobalI = 0;
; 11931: 
; 11932: // As one line: [
; 11933: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11934: clocks1 = clock();
; 11935:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11936: {
; 11937: //Search area is between Strng[0] .. Strng[n-1]
; 11938: 
; 11939: for (i = 0; i<52; i++)
; 11940:    {
; 11941: Railgunhits=0;
; 11942: clocks3 = clock();
; 11943: 	FoundInPTR = Railgun_Quadruplet_7Elsiane_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11944: clocks4 = clock();
; 11945: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11946:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Elsiane performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11947:                        }
; 11948:    }
; 11949: }
; 11950: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11951: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11952: printf( "Railgun_Quadruplet_7Elsiane 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11953: // As one line: ]
; 11954: 
; 11955: printf( "Railgun_Quadruplet_7Elsiane 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11956: 
; 11957: 
; 11958: 
; 11959: 
; 11960: GlobalSP = 0;
; 11961: GlobalI = 0;
; 11962: 
; 11963: // As one line: [
; 11964: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11965: clocks1 = clock();
; 11966:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11967: {
; 11968: //Search area is between Strng[0] .. Strng[n-1]
; 11969: 
; 11970: for (i = 0; i<52; i++)
; 11971:    {
; 11972: Railgunhits=0;
; 11973: clocks3 = clock();
; 11974: 	FoundInPTR = Boyer_Moore_Flensburg(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 11975: clocks4 = clock();
; 11976: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 11977:                          printf( "Found ('%s') %d time(s), Boyer_Moore_Flensburg performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 11978:                        }
; 11979:    }
; 11980: }
; 11981: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 11982: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 11983: printf( "Boyer_Moore_Flensburg 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 11984: // As one line: ]
; 11985: 
; 11986: printf( "Boyer_Moore_Flensburg 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 11987: 
; 11988: 
; 11989: 
; 11990: 
; 11991: 
; 11992: GlobalSP = 0;
; 11993: GlobalI = 0;
; 11994: 
; 11995: // As one line: [
; 11996: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 11997: clocks1 = clock();
; 11998:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 11999: {
; 12000: //Search area is between Strng[0] .. Strng[n-1]
; 12001: 
; 12002: for (i = 0; i<52; i++)
; 12003:    {
; 12004: Railgunhits=0;
; 12005: clocks3 = clock();
; 12006: 	FoundInPTR = Railgun_Quadruplet_7Gulliver_count_hits(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 12007: clocks4 = clock();
; 12008: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 12009:                          printf( "Found ('%s') %d time(s), Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 12010:                        }
; 12011:    }
; 12012: }
; 12013: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12014: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12015: printf( "Railgun_Quadruplet_7Gulliver 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12016: // As one line: ]
; 12017: 
; 12018: printf( "Railgun_Quadruplet_7Gulliver 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 12019: 
; 12020: 
; 12021: 
; 12022: 
; 12023: 
; 12024: GlobalSP = 0;
; 12025: GlobalI = 0;
; 12026: 
; 12027: // As one line: [
; 12028: printf( "\nDoing Search for 52 Patterns into String(%dbytes) as-one-line ...\n", Strnglen);
; 12029: clocks1 = clock();
; 12030:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12031: {
; 12032: //Search area is between Strng[0] .. Strng[n-1]
; 12033: 
; 12034: for (i = 0; i<52; i++)
; 12035:    {
; 12036: Railgunhits=0;
; 12037: clocks3 = clock();
; 12038: 	FoundInPTR = Brute_Force_Dummy(&Strng[0], Dumbino[i], Strnglen, strlen(Dumbino[i]));
; 12039: clocks4 = clock();
; 12040: if (Bozan == (1<<4)-1) { TotalRoughSearchTime = clocks4 - clocks3; TotalRoughSearchTime++;
; 12041:                          printf( "Found ('%s') %d time(s), Brute_Force_Dummy performance: %luKB/clock\n", Dumbino[i], Railgunhits, (Strnglen/((long)(TotalRoughSearchTime)))>>10);
; 12042:                        }
; 12043:    }
; 12044: }
; 12045: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12046: //printf( "Railgun_6pp_hits/Railgun_6pp_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12047: printf( "Brute_Force_Dummy 52 i.e. average performance: %luKB/clock\n", ((unsigned long long)52*Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12048: // As one line: ]
; 12049: 
; 12050: printf( "Brute_Force_Dummy 52 total Skip-Performance/Iterations: %llu/%llu\n", GlobalSP, GlobalI);
; 12051: 
; 12052: 
; 12053: 
; 12054: 
; 12055: 
; 12056: 
; 12057: 
; 12058: 
; 12059: 
; 12060: 
; 12061: 
; 12062: //exit(0);
; 12063: 
; 12064: 
; 12065: 
; 12066: 
; 12067: 
; 12068: 
; 12069: 
; 12070: if (argc==1) {
; 12071: 
; 12072: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) line-by-line ...\n", Patternlen, Strnglen);
; 12073: 
; 12074: // 7[
; 12075: clocks1 = clock();
; 12076:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12077: {
; 12078: //Search area is between Strng[0] .. Strng[n-1]
; 12079: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12080: ThunderwithL=0;ThunderwithR=0;
; 12081: 	for (;;)
; 12082: 	{
; 12083: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12084: 	FoundInPTR = strstr_Microsoft(&Strng[ThunderwithL], &Pattern[0]);
; 12085: 	if ( FoundInPTR != NULL) {strstrMicrosofthits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12086: 	LinesEncountered++;
; 12087: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12088: 	if (ThunderwithR >= Strnglen-1) break;
; 12089: 	}
; 12090: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12091: }
; 12092: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12093: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12094: printf( "strstr_Microsoft_hits/strstr_Microsoft_clocks: %lu/%lu\n", strstrMicrosofthits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12095: printf( "strstr_Microsoft performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12096: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12097: // 7]
; 12098: 
; 12099: // 8[
; 12100: clocks1 = clock();
; 12101:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12102: {
; 12103: //Search area is between Strng[0] .. Strng[n-1]
; 12104: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12105: ThunderwithL=0;ThunderwithR=0;
; 12106: 	for (;;)
; 12107: 	{
; 12108: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12109: 	FoundInPTR = strstr_GNU_C_Library(&Strng[ThunderwithL], &Pattern[0]);
; 12110: 	if ( FoundInPTR != 0) {strstrGNUCLibraryhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12111: 	LinesEncountered++;
; 12112: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12113: 	if (ThunderwithR >= Strnglen-1) break;
; 12114: 	}
; 12115: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12116: }
; 12117: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12118: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12119: printf( "strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: %lu/%lu\n", strstrGNUCLibraryhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12120: printf( "strstr_GNU_C_Library performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12121: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12122: // 8]
; 12123: 
; 12124: // 9[
; 12125: clocks1 = clock();
; 12126:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12127: {
; 12128: //Search area is between Strng[0] .. Strng[n-1]
; 12129: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12130: ThunderwithL=0;ThunderwithR=0;
; 12131: 	for (;;)
; 12132: 	{
; 12133: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12134: 	FoundInPTR = Railgun_Doublet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12135: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12136: 	LinesEncountered++;
; 12137: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12138: 	if (ThunderwithR >= Strnglen-1) break;
; 12139: 	}
; 12140: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12141: }
; 12142: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12143: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12144: printf( "Railgun_Doublet_hits/Railgun_Doublet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12145: printf( "Railgun_Doublet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12146: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12147: // 9]
; 12148: 
; 12149: // +[
; 12150: clocks1 = clock();
; 12151:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12152: {
; 12153: //Search area is between Strng[0] .. Strng[n-1]
; 12154: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12155: ThunderwithL=0;ThunderwithR=0;
; 12156: 	for (;;)
; 12157: 	{
; 12158: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12159: 	FoundInPTR = Railgun_Quadruplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12160: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12161: 	LinesEncountered++;
; 12162: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12163: 	if (ThunderwithR >= Strnglen-1) break;
; 12164: 	}
; 12165: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12166: }
; 12167: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12168: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12169: printf( "Railgun_Quadruplet_hits/Railgun_Quadruplet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12170: printf( "Railgun_Quadruplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12171: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12172: // +]
; 12173: 
; 12174: 
; 12175: // Z[
; 12176: clocks1 = clock();
; 12177:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12178: {
; 12179: //Search area is between Strng[0] .. Strng[n-1]
; 12180: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12181: ThunderwithL=0;ThunderwithR=0;
; 12182: 	for (;;)
; 12183: 	{
; 12184: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12185: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12186: 	if ( FoundInPTR != NULL) {Railgun_Quadruplet_6pp_GO++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12187: 	LinesEncountered++;
; 12188: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12189: 	if (ThunderwithR >= Strnglen-1) break;
; 12190: 	}
; 12191: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12192: }
; 12193: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12194: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12195: printf( "Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %lu/%lu\n", Railgun_Quadruplet_6pp_GO>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12196: printf( "Railgun_Quadruplet_7 performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12197: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12198: // Z]
; 12199: 
; 12200: 
; 12201: 
; 12202: // Z[
; 12203: clocks1 = clock();
; 12204:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12205: {
; 12206: //Search area is between Strng[0] .. Strng[n-1]
; 12207: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12208: ThunderwithL=0;ThunderwithR=0;
; 12209: 	for (;;)
; 12210: 	{
; 12211: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12212: 	FoundInPTR = Railgun_Quadruplet_8Triplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12213: 	if ( FoundInPTR != NULL) {Railgun_Quadruplet_88++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12214: 	LinesEncountered++;
; 12215: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12216: 	if (ThunderwithR >= Strnglen-1) break;
; 12217: 	}
; 12218: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12219: }
; 12220: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12221: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12222: printf( "Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Triplet_clocks: %lu/%lu\n", Railgun_Quadruplet_88>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12223: printf( "Railgun_Quadruplet_8Triplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12224: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12225: // Z]
; 12226: 
; 12227: 
; 12228: 
; 12229: // Z[
; 12230: clocks1 = clock();
; 12231:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12232: {
; 12233: //Search area is between Strng[0] .. Strng[n-1]
; 12234: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12235: ThunderwithL=0;ThunderwithR=0;
; 12236: 	for (;;)
; 12237: 	{
; 12238: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12239: 	FoundInPTR = BNDM_32(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12240: 	if ( FoundInPTR != NULL) {BNDM32++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12241: 	LinesEncountered++;
; 12242: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12243: 	if (ThunderwithR >= Strnglen-1) break;
; 12244: 	}
; 12245: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12246: }
; 12247: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12248: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12249: printf( "BNDM_32_hits/BNDM_32_clocks: %lu/%lu\n", BNDM32>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12250: printf( "BNDM_32 performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12251: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12252: // Z]
; 12253: 
; 12254: 
; 12255: 
; 12256: 
; 12257: 
; 12258: 
; 12259: 
; 12260: // 6[
; 12261: clocks1 = clock();
; 12262:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12263: {
; 12264: //Search area is between Strng[0] .. Strng[n-1]
; 12265: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12266: ThunderwithL=0;ThunderwithR=0;
; 12267: 	for (;;)
; 12268: 	{
; 12269: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12270: 	FoundInPTR = KarpRabinKaze_BOOSTED(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12271: 	if ( FoundInPTR != NULL) {KarpRabinKaze_BOOSTEDhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12272: 	LinesEncountered++;
; 12273: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12274: 	if (ThunderwithR >= Strnglen-1) break;
; 12275: 	}
; 12276: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12277: }
; 12278: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12279: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12280: printf( "KarpRabinKaze_BOOSTED_hits/KarpRabinKaze_BOOSTED_clocks: %lu/%lu\n", KarpRabinKaze_BOOSTEDhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12281: printf( "KarpRabinKaze_BOOSTED performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12282: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12283: // 6]
; 12284: 
; 12285: // 2[
; 12286: clocks1 = clock();
; 12287:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12288: {
; 12289: //Search area is between Strng[0] .. Strng[n-1]
; 12290: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12291: ThunderwithL=0;ThunderwithR=0;
; 12292: 	for (;;)
; 12293: 	{
; 12294: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12295: 	FoundInPTR = KarpRabinKaze(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12296: 	if ( FoundInPTR != NULL) {KarpRabinKazehits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12297: 	LinesEncountered++;
; 12298: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12299: 	if (ThunderwithR >= Strnglen-1) break;
; 12300: 	}
; 12301: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12302: }
; 12303: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12304: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12305: printf( "KarpRabinKaze_hits/KarpRabinKaze_clocks: %lu/%lu\n", KarpRabinKazehits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12306: printf( "KarpRabinKaze performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12307: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12308: // 2]
; 12309: 
; 12310: // 3[
; 12311: clocks1 = clock();
; 12312:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12313: {
; 12314: //Search area is between Strng[0] .. Strng[n-1]
; 12315: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12316: ThunderwithL=0;ThunderwithR=0;
; 12317: 	for (;;)
; 12318: 	{
; 12319: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12320: 	FoundIn = Karp_Rabin(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12321: 	if ( FoundIn != -1) {KarpRabinhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+FoundIn;} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12322: 	LinesEncountered++;
; 12323: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12324: 	if (ThunderwithR >= Strnglen-1) break;
; 12325: 	}
; 12326: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12327: }
; 12328: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12329: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12330: printf( "Karp_Rabin_hits/Karp_Rabin_clocks: %lu/%lu\n", KarpRabinhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12331: printf( "Karp_Rabin performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12332: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12333: // 3]
; 12334: 
; 12335: // 1[
; 12336: clocks1 = clock();
; 12337:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12338: {
; 12339: //Search area is between Strng[0] .. Strng[n-1]
; 12340: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12341: ThunderwithL=0;ThunderwithR=0;
; 12342: 	for (;;)
; 12343: 	{
; 12344: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12345: 	FoundIn = (long)Brute_Force_Dummy(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12346: 	if ( FoundIn != -1) {BruteForceDummyhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+FoundIn;} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12347: 	LinesEncountered++;
; 12348: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12349: 	if (ThunderwithR >= Strnglen-1) break;
; 12350: 	}
; 12351: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12352: }
; 12353: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12354: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12355: printf( "Brute_Force_Dummy_hits/Brute_Force_Dummy_clocks: %lu/%lu\n", BruteForceDummyhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12356: printf( "Brute_Force_Dummy performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12357: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12358: // 1]
; 12359: 
; 12360: // 4[
; 12361: clocks1 = clock();
; 12362:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12363: {
; 12364: //Search area is between Strng[0] .. Strng[n-1]
; 12365: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12366: ThunderwithL=0;ThunderwithR=0;
; 12367: 	for (;;)
; 12368: 	{
; 12369: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12370: 	FoundIn = HORSPOOL(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12371: 	if ( FoundIn != -1) {HORSPOOLhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+FoundIn;} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12372: 	LinesEncountered++;
; 12373: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12374: 	if (ThunderwithR >= Strnglen-1) break;
; 12375: 	}
; 12376: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12377: }
; 12378: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12379: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12380: printf( "Boyer-Moore-Horspool_hits/Boyer-Moore-Horspool_clocks: %lu/%lu\n", HORSPOOLhits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12381: printf( "Boyer-Moore-Horspool performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12382: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12383: // 4]
; 12384: 
; 12385: // 5[
; 12386: clocks1 = clock();
; 12387:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12388: {
; 12389: //Search area is between Strng[0] .. Strng[n-1]
; 12390: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12391: ThunderwithL=0;ThunderwithR=0;
; 12392: 	for (;;)
; 12393: 	{
; 12394: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12395: 	FoundIn = Boyer_Moore_Horspool_Kaze(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12396: 	if ( FoundIn != -1) {HORSPOOL_Kazehits++; StrnglenTRAVERSED=StrnglenTRAVERSED+FoundIn;} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12397: 	LinesEncountered++;
; 12398: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12399: 	if (ThunderwithR >= Strnglen-1) break;
; 12400: 	}
; 12401: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12402: }
; 12403: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12404: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12405: printf( "Boyer_Moore_Horspool_Kaze_hits/Boyer_Moore_Horspool_Kaze_clocks: %lu/%lu\n", HORSPOOL_Kazehits>>4, 1+((long)(TotalRoughSearchTime)>>4));
; 12406: printf( "Boyer_Moore_Horspool_Kaze performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12407: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12408: // 5]
; 12409: 
; 12410: 
; 12411: LineBylinePfu:
; 12412: 
; 12413: // DUMBO ... [
; 12414: printf( "\nDUMBO 8x2 ...\n");
; 12415: for (i = 0; i<8; i++)
; 12416:    {
; 12417: for (j = 0; j<2; j++)
; 12418:    {
; 12419: 
; 12420: strcpy (Pattern, DumboBox[i][j]);
; 12421: Patternlen = strlen(&Pattern[0]);
; 12422: 
; 12423: printf( "\nSearching for Pattern('%s',%dbytes) into String(%dbytes) line-by-line ...\n\n", Pattern, Patternlen, Strnglen);
; 12424: 
; 12425: 
; 12426: // 7[
; 12427: clocks1 = clock();
; 12428:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12429: {
; 12430: strstrMicrosofthits=0;
; 12431: //Search area is between Strng[0] .. Strng[n-1]
; 12432: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12433: ThunderwithL=0;ThunderwithR=0;
; 12434: 	for (;;)
; 12435: 	{
; 12436: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12437: 	FoundInPTR = strstr_Microsoft(&Strng[ThunderwithL], &Pattern[0]);
; 12438: 	if ( FoundInPTR != NULL) {strstrMicrosofthits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12439: 	LinesEncountered++;
; 12440: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12441: 	if (ThunderwithR >= Strnglen-1) break;
; 12442: 	}
; 12443: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12444: }
; 12445: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12446: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12447: printf( "strstr_Microsoft_hits/strstr_Microsoft_clocks: %lu/%lu\n", strstrMicrosofthits, 1+((long)(TotalRoughSearchTime)>>4));
; 12448: printf( "strstr_Microsoft performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12449: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12450: // 7]
; 12451: 
; 12452: // 8[
; 12453: clocks1 = clock();
; 12454:     for (Bozan=0; Bozan < (1<<5); Bozan++) // 16 times, at end >>4
; 12455: {
; 12456: strstrGNUCLibraryhits=0;
; 12457: //Search area is between Strng[0] .. Strng[n-1]
; 12458: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12459: ThunderwithL=0;ThunderwithR=0;
; 12460: 	for (;;)
; 12461: 	{
; 12462: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12463: 	FoundInPTR = strstr_GNU_C_Library(&Strng[ThunderwithL], &Pattern[0]);
; 12464: 	if ( FoundInPTR != 0) {strstrGNUCLibraryhits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12465: 	LinesEncountered++;
; 12466: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12467: 	if (ThunderwithR >= Strnglen-1) break;
; 12468: 	}
; 12469: if (Bozan != (1<<5)-1) LinesEncountered=0;
; 12470: }
; 12471: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12472: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12473: printf( "strstr_GNU_C_Library_hits/strstr_GNU_C_Library_clocks: %lu/%lu\n", strstrGNUCLibraryhits, 1+((long)(TotalRoughSearchTime)>>5));
; 12474: printf( "strstr_GNU_C_Library performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>5)))>>10);
; 12475: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12476: // 8]
; 12477: 
; 12478: // 9[
; 12479: clocks1 = clock();
; 12480:     for (Bozan=0; Bozan < (1<<5); Bozan++) // 16 times, at end >>4
; 12481: {
; 12482: Karp_Rabin_Kaze_4_OCTETShits=0;
; 12483: //Search area is between Strng[0] .. Strng[n-1]
; 12484: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12485: ThunderwithL=0;ThunderwithR=0;
; 12486: 	for (;;)
; 12487: 	{
; 12488: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12489: 	FoundInPTR = Railgun_Doublet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12490: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12491: 	LinesEncountered++;
; 12492: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12493: 	if (ThunderwithR >= Strnglen-1) break;
; 12494: 	}
; 12495: if (Bozan != (1<<5)-1) LinesEncountered=0;
; 12496: }
; 12497: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12498: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12499: printf( "Railgun_Doublet_hits/Railgun_Doublet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits, 1+((long)(TotalRoughSearchTime)>>5));
; 12500: printf( "Railgun_Doublet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>5)))>>10);
; 12501: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12502: // 9]
; 12503: 
; 12504: // +[
; 12505: clocks1 = clock();
; 12506:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12507: {
; 12508: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12509: //Search area is between Strng[0] .. Strng[n-1]
; 12510: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12511: ThunderwithL=0;ThunderwithR=0;
; 12512: 	for (;;)
; 12513: 	{
; 12514: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12515: 	FoundInPTR = Railgun_Quadruplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12516: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12517: 	LinesEncountered++;
; 12518: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12519: 	if (ThunderwithR >= Strnglen-1) break;
; 12520: 	}
; 12521: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12522: }
; 12523: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12524: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12525: printf( "Railgun_Quadruplet_hits/Railgun_Quadruplet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12526: printf( "Railgun_Quadruplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12527: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12528: // +]
; 12529: 
; 12530: // Z[
; 12531: clocks1 = clock();
; 12532:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12533: {
; 12534: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12535: //Search area is between Strng[0] .. Strng[n-1]
; 12536: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12537: ThunderwithL=0;ThunderwithR=0;
; 12538: 	for (;;)
; 12539: 	{
; 12540: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12541: 	FoundInPTR = Railgun_Quadruplet_6pp(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12542: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12543: 	LinesEncountered++;
; 12544: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12545: 	if (ThunderwithR >= Strnglen-1) break;
; 12546: 	}
; 12547: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12548: }
; 12549: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12550: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12551: printf( "Railgun_Quadruplet_6pp_hits/Railgun_Quadruplet_6pp_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12552: printf( "Railgun_Quadruplet_6pp performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12553: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12554: // Z]
; 12555: 
; 12556: 
; 12557: // M[
; 12558: clocks1 = clock();
; 12559:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12560: {
; 12561: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12562: //Search area is between Strng[0] .. Strng[n-1]
; 12563: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12564: ThunderwithL=0;ThunderwithR=0;
; 12565: 	for (;;)
; 12566: 	{
; 12567: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12568: 	FoundInPTR = Railgun_Quadruplet_7(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12569: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12570: 	LinesEncountered++;
; 12571: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12572: 	if (ThunderwithR >= Strnglen-1) break;
; 12573: 	}
; 12574: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12575: }
; 12576: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12577: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12578: printf( "Railgun_Quadruplet_7_hits/Railgun_Quadruplet_7_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12579: printf( "Railgun_Quadruplet_7 performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12580: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12581: // M]
; 12582: 
; 12583: 
; 12584: // M[
; 12585: clocks1 = clock();
; 12586:     for (Bozan=0; Bozan < (1<<5); Bozan++) // 16 times, at end >>4
; 12587: {
; 12588: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12589: //Search area is between Strng[0] .. Strng[n-1]
; 12590: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12591: ThunderwithL=0;ThunderwithR=0;
; 12592: 	for (;;)
; 12593: 	{
; 12594: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12595: 	FoundInPTR = Railgun_Quadruplet_8Triplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12596: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12597: 	LinesEncountered++;
; 12598: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12599: 	if (ThunderwithR >= Strnglen-1) break;
; 12600: 	}
; 12601: if (Bozan != (1<<5)-1) LinesEncountered=0;
; 12602: }
; 12603: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12604: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12605: printf( "Railgun_Quadruplet_8Triplet_hits/Railgun_Quadruplet_8Triplet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>5));
; 12606: printf( "Railgun_Quadruplet_8Triplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>5)))>>10);
; 12607: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12608: // M]
; 12609: 
; 12610: // M[
; 12611: clocks1 = clock();
; 12612:     for (Bozan=0; Bozan < (1<<5); Bozan++) // 16 times, at end >>4
; 12613: {
; 12614: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12615: //Search area is between Strng[0] .. Strng[n-1]
; 12616: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12617: ThunderwithL=0;ThunderwithR=0;
; 12618: 	for (;;)
; 12619: 	{
; 12620: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12621: 	FoundInPTR = Railgun_Mischa_8Triplet(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12622: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12623: 	LinesEncountered++;
; 12624: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12625: 	if (ThunderwithR >= Strnglen-1) break;
; 12626: 	}
; 12627: if (Bozan != (1<<5)-1) LinesEncountered=0;
; 12628: }
; 12629: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12630: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12631: printf( "Railgun_Mischa_8Triplet_hits/Railgun_Mischa_8Triplet_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>5));
; 12632: printf( "Railgun_Mischa_8Triplet performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>5)))>>10);
; 12633: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12634: // M]
; 12635: 
; 12636: // M[
; 12637: clocks1 = clock();
; 12638:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12639: {
; 12640: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12641: //Search area is between Strng[0] .. Strng[n-1]
; 12642: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12643: ThunderwithL=0;ThunderwithR=0;
; 12644: 	for (;;)
; 12645: 	{
; 12646: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12647: 	FoundInPTR = BNDM_32(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12648: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12649: 	LinesEncountered++;
; 12650: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12651: 	if (ThunderwithR >= Strnglen-1) break;
; 12652: 	}
; 12653: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12654: }
; 12655: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12656: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12657: printf( "BNDM_32_hits/BNDM_32_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12658: printf( "BNDM_32 performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12659: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12660: // M]
; 12661: 
; 12662: 
; 12663: // M[
; 12664: clocks1 = clock();
; 12665:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 12666: {
; 12667: Karp_Rabin_Kaze_4_OCTETShits_DOUBLET=0;
; 12668: //Search area is between Strng[0] .. Strng[n-1]
; 12669: StrnglenTRAVERSED=0; // Only traversed chars i.e. real
; 12670: ThunderwithL=0;ThunderwithR=0;
; 12671: 	for (;;)
; 12672: 	{
; 12673: 	while (Strng[ThunderwithR] != 10 && ThunderwithR < Strnglen-1) {ThunderwithR++;}
; 12674: 	FoundInPTR = Railgun_Quadruplet_7Gulliver(&Strng[ThunderwithL], &Pattern[0], ThunderwithR - ThunderwithL, Patternlen);
; 12675: 	if ( FoundInPTR != NULL) {Karp_Rabin_Kaze_4_OCTETShits_DOUBLET++; StrnglenTRAVERSED=StrnglenTRAVERSED+(FoundInPTR-&Strng[ThunderwithL]);} else StrnglenTRAVERSED=StrnglenTRAVERSED+(ThunderwithR - ThunderwithL);
; 12676: 	LinesEncountered++;
; 12677: 	ThunderwithR++;	ThunderwithL=ThunderwithR;
; 12678: 	if (ThunderwithR >= Strnglen-1) break;
; 12679: 	}
; 12680: if (Bozan != (1<<4)-1) LinesEncountered=0;
; 12681: }
; 12682: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;
; 12683: printf( "LinesEncountered: %lu\n", LinesEncountered);
; 12684: printf( "Railgun_Quadruplet_7Gulliver_hits/Railgun_Quadruplet_7Gulliver_clocks: %lu/%lu\n", Karp_Rabin_Kaze_4_OCTETShits_DOUBLET, 1+((long)(TotalRoughSearchTime)>>4));
; 12685: printf( "Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", (StrnglenTRAVERSED/(1+((long)(TotalRoughSearchTime)>>4)))>>10);
; 12686: printf( "StrnglenTRAVERSED: %lu bytes\n", StrnglenTRAVERSED);
; 12687: // M]
; 12688: 
; 12689: 
; 12690:    }
; 12691:    }
; 12692: // DUMBO ... ]
; 12693: 
; 12694: } //if (argc==1) {
; 12695: 
; 12696: //exit(1); // Comment it to get on!
; 12697: 
; 12698: return(0);
; 12699:   }

  05692	8b 8c 24 f4 07
	00 00		 mov	 ecx, DWORD PTR __$ArrayPad$[esp+2040]
  05699	83 c4 04	 add	 esp, 4
  0569c	8d 47 01	 lea	 eax, DWORD PTR [edi+1]
  0569f	5f		 pop	 edi
  056a0	5d		 pop	 ebp
  056a1	33 cc		 xor	 ecx, esp
  056a3	e8 00 00 00 00	 call	 @__security_check_cookie@4
  056a8	81 c4 ec 07 00
	00		 add	 esp, 2028		; 000007ecH
  056ae	c3		 ret	 0
$LN579@main:
  056af	56		 push	 esi

; 10504: 
; 10505:    fseek(fp_inLINE, 0, SEEK_END);

  056b0	6a 02		 push	 2
  056b2	6a 00		 push	 0
  056b4	57		 push	 edi
  056b5	e8 00 00 00 00	 call	 _fseek

; 10506:    Strnglen = ftell(fp_inLINE);

  056ba	57		 push	 edi
  056bb	e8 00 00 00 00	 call	 _ftell

; 10507:    fseek(fp_inLINE, 0, SEEK_SET);

  056c0	6a 00		 push	 0
  056c2	6a 00		 push	 0
  056c4	57		 push	 edi
  056c5	8b f0		 mov	 esi, eax
  056c7	e8 00 00 00 00	 call	 _fseek

; 10508:    fread(Strng, 1, Strnglen, fp_inLINE);

  056cc	57		 push	 edi
  056cd	56		 push	 esi
  056ce	6a 01		 push	 1
  056d0	55		 push	 ebp
  056d1	e8 00 00 00 00	 call	 _fread

; 10509: fclose(fp_inLINE);

  056d6	57		 push	 edi
  056d7	e8 00 00 00 00	 call	 _fclose
  056dc	83 c4 30	 add	 esp, 48			; 00000030H

; 10510: 
; 10511: // Replacing CR with NULL i.e. 13->0
; 10512: 	for (ThunderwithL=0; ThunderwithL<Strnglen; ThunderwithL++) {

  056df	33 c0		 xor	 eax, eax
  056e1	85 f6		 test	 esi, esi
  056e3	7e 19		 jle	 SHORT $LN576@main
$LL578@main:

; 10513: 		if (Strng[ThunderwithL] == 13) Strng[ThunderwithL] = 0;

  056e5	80 3c 28 0d	 cmp	 BYTE PTR [eax+ebp], 13	; 0000000dH
  056e9	75 04		 jne	 SHORT $LN575@main
  056eb	c6 04 28 00	 mov	 BYTE PTR [eax+ebp], 0
$LN575@main:

; 10514: 		if (Strng[ThunderwithL] == 10) Strng[ThunderwithL] = 0;

  056ef	80 3c 28 0a	 cmp	 BYTE PTR [eax+ebp], 10	; 0000000aH
  056f3	75 04		 jne	 SHORT $LN577@main
  056f5	c6 04 28 00	 mov	 BYTE PTR [eax+ebp], 0
$LN577@main:

; 10510: 
; 10511: // Replacing CR with NULL i.e. 13->0
; 10512: 	for (ThunderwithL=0; ThunderwithL<Strnglen; ThunderwithL++) {

  056f9	40		 inc	 eax
  056fa	3b c6		 cmp	 eax, esi
  056fc	7c e7		 jl	 SHORT $LL578@main
$LN576@main:

; 10515: 	}
; 10516: ThunderwithL=0;ThunderwithR=0;
; 10517: 
; 10518: //if (argc==2) goto LineBylinePfu;
; 10519: //if (argc!=1) goto SlowerButStronger;
; 10520: 
; 10521: if (argc==1) {

  056fe	83 bc 24 fc 07
	00 00 01	 cmp	 DWORD PTR _argc$[esp+2036], 1
  05706	0f 85 97 00 00
	00		 jne	 $LN601@main

; 10522: printf("\nLast 6 lines of 'OSHO.TXT' file 197 MB (206,908,949 bytes):\n");

  0570c	68 00 00 00 00	 push	 OFFSET $SG8274
  05711	e8 00 00 00 00	 call	 _printf

; 10523: printf("           If you have read through the preceding chapters you should have a pretty good idea on how to make\n");

  05716	68 00 00 00 00	 push	 OFFSET $SG8275
  0571b	e8 00 00 00 00	 call	 _printf

; 10524: printf("           use of the Osho Books on CD-ROM. What use you will put it to is up to you. It is the largest ever\n");

  05720	68 00 00 00 00	 push	 OFFSET $SG8276
  05725	e8 00 00 00 00	 call	 _printf

; 10525: printf("           electronic repository of understanding and knowledge on meditation and its techniques. It is also\n");

  0572a	68 00 00 00 00	 push	 OFFSET $SG8277
  0572f	e8 00 00 00 00	 call	 _printf

; 10526: printf("           much more, a complete, world view of the New Man and a new way of life. The purpose of this\n");

  05734	68 00 00 00 00	 push	 OFFSET $SG8278
  05739	e8 00 00 00 00	 call	 _printf

; 10527: printf("           CD-ROM is to provide access to Osho's words, ideas and vision, and to make them available to as\n");

  0573e	68 00 00 00 00	 push	 OFFSET $SG8279
  05743	e8 00 00 00 00	 call	 _printf

; 10528: printf("           many people as possible.\n");

  05748	68 00 00 00 00	 push	 OFFSET $SG8280
  0574d	e8 00 00 00 00	 call	 _printf

; 10529: 
; 10530: printf("\nLast 3 lines of 'hs_alt_HuRef_chr1.fa' file 212 MB (222,610,477 bytes):\n");

  05752	68 00 00 00 00	 push	 OFFSET $SG8281
  05757	e8 00 00 00 00	 call	 _printf

; 10531: printf("AGATTTTAAAGATTTTCTTTTTTTTTGACATAGAATCTTATGGAGGCTGAGAAATAATTTTTTTTCTATT\n");

  0575c	68 00 00 00 00	 push	 OFFSET $SG8282
  05761	e8 00 00 00 00	 call	 _printf

; 10532: printf("TTATTCTTCAGCCCCAGGTGTTTGCTTTTGCAGATTCTTGAGCACATTGAGAGCCTCCAAGGCATGGAGT\n");

  05766	68 00 00 00 00	 push	 OFFSET $SG8283
  0576b	e8 00 00 00 00	 call	 _printf

; 10533: printf("GGGGTGCCTGAAGTT\n");

  05770	68 00 00 00 00	 push	 OFFSET $SG8284
  05775	e8 00 00 00 00	 call	 _printf

; 10534: 
; 10535: printf("\nInput Pattern(up to 19+2000 chars): "); gets(Pattern); // char * __cdecl gets(char *);

  0577a	68 00 00 00 00	 push	 OFFSET $SG8285
  0577f	e8 00 00 00 00	 call	 _printf
  05784	8d 44 24 40	 lea	 eax, DWORD PTR _Pattern$[esp+2088]
  05788	50		 push	 eax
  05789	e8 00 00 00 00	 call	 _gets

; 10536: Patternlen = strlen(&Pattern[0]);

  0578e	8d 7c 24 44	 lea	 edi, DWORD PTR _Pattern$[esp+2092]
  05792	83 c4 34	 add	 esp, 52			; 00000034H
  05795	8d 4f 01	 lea	 ecx, DWORD PTR [edi+1]
$LL600@main:
  05798	8a 07		 mov	 al, BYTE PTR [edi]
  0579a	47		 inc	 edi
  0579b	84 c0		 test	 al, al
  0579d	75 f9		 jne	 SHORT $LL600@main
  0579f	2b f9		 sub	 edi, ecx
  057a1	eb 04		 jmp	 SHORT $LN573@main
$LN601@main:
  057a3	8b 7c 24 0c	 mov	 edi, DWORD PTR _Patternlen$[esp+2040]
$LN573@main:
  057a7	53		 push	 ebx

; 10537: }
; 10538: 
; 10539: 
; 10540: 
; 10541: 
; 10542: // As one line: [
; 10543: Railgunhits=0;
; 10544: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);

  057a8	56		 push	 esi
  057a9	57		 push	 edi
  057aa	68 00 00 00 00	 push	 OFFSET $SG8286
  057af	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR _Railgunhits, 0
  057b9	e8 00 00 00 00	 call	 _printf

; 10545: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");

  057be	68 00 00 00 00	 push	 OFFSET $SG8287
  057c3	e8 00 00 00 00	 call	 _printf
  057c8	83 c4 10	 add	 esp, 16			; 00000010H

; 10546: clocks1 = clock();

  057cb	e8 00 00 00 00	 call	 _clock
  057d0	a3 00 00 00 00	 mov	 DWORD PTR _clocks1, eax
  057d5	bb 10 00 00 00	 mov	 ebx, 16			; 00000010H
  057da	8d 9b 00 00 00
	00		 npad	 6
$LL572@main:

; 10547:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10548: {
; 10549: //Search area is between Strng[0] .. Strng[n-1]
; 10550: 	FoundInPTR = Railgun_Quadruplet_7Gulliver(&Strng[0], &Pattern[0], Strnglen, Patternlen);

  057e0	57		 push	 edi
  057e1	56		 push	 esi
  057e2	8d 4c 24 1c	 lea	 ecx, DWORD PTR _Pattern$[esp+2052]
  057e6	51		 push	 ecx
  057e7	55		 push	 ebp
  057e8	e8 00 00 00 00	 call	 _Railgun_Quadruplet_7Gulliver
  057ed	83 c4 10	 add	 esp, 16			; 00000010H
  057f0	4b		 dec	 ebx
  057f1	75 ed		 jne	 SHORT $LL572@main

; 10551: }
; 10552: 	if (FoundInPTR != NULL)

  057f3	85 c0		 test	 eax, eax
  057f5	74 11		 je	 SHORT $LN569@main

; 10553: 	printf("The first instance occurred at position %d within next line:\n%s\n", (long)(FoundInPTR-Strng), FoundInPTR);

  057f7	50		 push	 eax
  057f8	2b c5		 sub	 eax, ebp
  057fa	50		 push	 eax
  057fb	68 00 00 00 00	 push	 OFFSET $SG8294
  05800	e8 00 00 00 00	 call	 _printf
  05805	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN569@main:

; 10554: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;

  05808	e8 00 00 00 00	 call	 _clock
  0580d	a3 00 00 00 00	 mov	 DWORD PTR _clocks2, eax
  05812	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR _clocks1
  05818	89 44 24 10	 mov	 DWORD PTR tv4717[esp+2044], eax
  0581c	db 44 24 10	 fild	 DWORD PTR tv4717[esp+2044]
  05820	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@3ff0000000000000
  05826	dd 15 00 00 00
	00		 fst	 QWORD PTR _TotalRoughSearchTime

; 10555: printf( "Railgun_Quadruplet_7Gulliver_hits/Railgun_Quadruplet_7Gulliver_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));

  0582c	e8 00 00 00 00	 call	 __ftol2_sse
  05831	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR _Railgunhits
  05837	c1 f8 04	 sar	 eax, 4
  0583a	40		 inc	 eax
  0583b	50		 push	 eax
  0583c	c1 fa 04	 sar	 edx, 4
  0583f	52		 push	 edx
  05840	68 00 00 00 00	 push	 OFFSET $SG8296
  05845	e8 00 00 00 00	 call	 _printf

; 10556: printf( "Railgun_Quadruplet_7Gulliver performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);

  0584a	dd 05 00 00 00
	00		 fld	 QWORD PTR _TotalRoughSearchTime
  05850	e8 00 00 00 00	 call	 __ftol2_sse
  05855	8b c8		 mov	 ecx, eax
  05857	c1 f9 04	 sar	 ecx, 4
  0585a	8b c6		 mov	 eax, esi
  0585c	99		 cdq
  0585d	41		 inc	 ecx
  0585e	f7 f9		 idiv	 ecx
  05860	c1 f8 0a	 sar	 eax, 10			; 0000000aH
  05863	50		 push	 eax
  05864	68 00 00 00 00	 push	 OFFSET $SG8298
  05869	e8 00 00 00 00	 call	 _printf

; 10557: // As one line: ]
; 10558: 
; 10559: // As one line: [
; 10560: Railgunhits=0;
; 10561: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);

  0586e	56		 push	 esi
  0586f	57		 push	 edi
  05870	68 00 00 00 00	 push	 OFFSET $SG8299
  05875	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR _Railgunhits, 0
  0587f	e8 00 00 00 00	 call	 _printf

; 10562: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");

  05884	68 00 00 00 00	 push	 OFFSET $SG8300
  05889	e8 00 00 00 00	 call	 _printf
  0588e	83 c4 24	 add	 esp, 36			; 00000024H

; 10563: clocks1 = clock();

  05891	e8 00 00 00 00	 call	 _clock
  05896	a3 00 00 00 00	 mov	 DWORD PTR _clocks1, eax
  0589b	bb 10 00 00 00	 mov	 ebx, 16			; 00000010H
$LL568@main:

; 10564:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10565: {
; 10566: //Search area is between Strng[0] .. Strng[n-1]
; 10567: 	FoundInPTR = Railgun_Hasherezade(&Strng[0], &Pattern[0], Strnglen, Patternlen);

  058a0	57		 push	 edi
  058a1	56		 push	 esi
  058a2	8d 54 24 1c	 lea	 edx, DWORD PTR _Pattern$[esp+2052]
  058a6	52		 push	 edx
  058a7	55		 push	 ebp
  058a8	e8 00 00 00 00	 call	 _Railgun_Hasherezade
  058ad	83 c4 10	 add	 esp, 16			; 00000010H
  058b0	4b		 dec	 ebx
  058b1	75 ed		 jne	 SHORT $LL568@main

; 10568: }
; 10569: 	if (FoundInPTR != NULL)

  058b3	85 c0		 test	 eax, eax
  058b5	74 11		 je	 SHORT $LN565@main

; 10570: 	printf("The first instance occurred at position %d within next line:\n%s\n", (long)(FoundInPTR-Strng), FoundInPTR);

  058b7	50		 push	 eax
  058b8	2b c5		 sub	 eax, ebp
  058ba	50		 push	 eax
  058bb	68 00 00 00 00	 push	 OFFSET $SG8307
  058c0	e8 00 00 00 00	 call	 _printf
  058c5	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN565@main:

; 10571: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;

  058c8	e8 00 00 00 00	 call	 _clock
  058cd	a3 00 00 00 00	 mov	 DWORD PTR _clocks2, eax
  058d2	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR _clocks1
  058d8	89 44 24 10	 mov	 DWORD PTR tv4697[esp+2044], eax
  058dc	db 44 24 10	 fild	 DWORD PTR tv4697[esp+2044]
  058e0	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@3ff0000000000000
  058e6	dd 15 00 00 00
	00		 fst	 QWORD PTR _TotalRoughSearchTime

; 10572: printf( "Railgun_Hasherezade_O4_BIT_14bit_hits/Railgun_Hasherezade_O4_BIT_14bit_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));

  058ec	e8 00 00 00 00	 call	 __ftol2_sse
  058f1	c1 f8 04	 sar	 eax, 4
  058f4	40		 inc	 eax
  058f5	50		 push	 eax
  058f6	a1 00 00 00 00	 mov	 eax, DWORD PTR _Railgunhits
  058fb	c1 f8 04	 sar	 eax, 4
  058fe	50		 push	 eax
  058ff	68 00 00 00 00	 push	 OFFSET $SG8309
  05904	e8 00 00 00 00	 call	 _printf

; 10573: printf( "Railgun_Hasherezade_O4_BIT_14bit performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);

  05909	dd 05 00 00 00
	00		 fld	 QWORD PTR _TotalRoughSearchTime
  0590f	e8 00 00 00 00	 call	 __ftol2_sse
  05914	8b c8		 mov	 ecx, eax
  05916	c1 f9 04	 sar	 ecx, 4
  05919	8b c6		 mov	 eax, esi
  0591b	99		 cdq
  0591c	41		 inc	 ecx
  0591d	f7 f9		 idiv	 ecx
  0591f	c1 f8 0a	 sar	 eax, 10			; 0000000aH
  05922	50		 push	 eax
  05923	68 00 00 00 00	 push	 OFFSET $SG8311
  05928	e8 00 00 00 00	 call	 _printf

; 10574: // As one line: ]
; 10575: 
; 10576: // As one line: [
; 10577: Railgunhits=0;
; 10578: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);

  0592d	56		 push	 esi
  0592e	57		 push	 edi
  0592f	68 00 00 00 00	 push	 OFFSET $SG8312
  05934	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR _Railgunhits, 0
  0593e	e8 00 00 00 00	 call	 _printf

; 10579: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");

  05943	68 00 00 00 00	 push	 OFFSET $SG8313
  05948	e8 00 00 00 00	 call	 _printf
  0594d	83 c4 24	 add	 esp, 36			; 00000024H

; 10580: clocks1 = clock();

  05950	e8 00 00 00 00	 call	 _clock
  05955	a3 00 00 00 00	 mov	 DWORD PTR _clocks1, eax
  0595a	bb 10 00 00 00	 mov	 ebx, 16			; 00000010H
  0595f	90		 npad	 1
$LL564@main:

; 10581:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10582: {
; 10583: //Search area is between Strng[0] .. Strng[n-1]
; 10584: 	FoundInPTR = Railgun_Hasherezade_O8_BYTE(&Strng[0], &Pattern[0], Strnglen, Patternlen);

  05960	57		 push	 edi
  05961	56		 push	 esi
  05962	8d 54 24 1c	 lea	 edx, DWORD PTR _Pattern$[esp+2052]
  05966	52		 push	 edx
  05967	55		 push	 ebp
  05968	e8 00 00 00 00	 call	 _Railgun_Hasherezade_O8_BYTE
  0596d	83 c4 10	 add	 esp, 16			; 00000010H
  05970	4b		 dec	 ebx
  05971	75 ed		 jne	 SHORT $LL564@main

; 10585: }
; 10586: 	if (FoundInPTR != NULL)

  05973	85 c0		 test	 eax, eax
  05975	74 11		 je	 SHORT $LN561@main

; 10587: 	printf("The first instance occurred at position %d within next line:\n%s\n", (long)(FoundInPTR-Strng), FoundInPTR);

  05977	50		 push	 eax
  05978	2b c5		 sub	 eax, ebp
  0597a	50		 push	 eax
  0597b	68 00 00 00 00	 push	 OFFSET $SG8320
  05980	e8 00 00 00 00	 call	 _printf
  05985	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN561@main:

; 10588: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;

  05988	e8 00 00 00 00	 call	 _clock
  0598d	a3 00 00 00 00	 mov	 DWORD PTR _clocks2, eax
  05992	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR _clocks1
  05998	89 44 24 10	 mov	 DWORD PTR tv4676[esp+2044], eax
  0599c	db 44 24 10	 fild	 DWORD PTR tv4676[esp+2044]
  059a0	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@3ff0000000000000
  059a6	dd 15 00 00 00
	00		 fst	 QWORD PTR _TotalRoughSearchTime

; 10589: printf( "Railgun_Hasherezade_O8_BYTE_14bit_hits/Railgun_Hasherezade_O8_BYTE_14bit_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));

  059ac	e8 00 00 00 00	 call	 __ftol2_sse
  059b1	c1 f8 04	 sar	 eax, 4
  059b4	40		 inc	 eax
  059b5	50		 push	 eax
  059b6	a1 00 00 00 00	 mov	 eax, DWORD PTR _Railgunhits
  059bb	c1 f8 04	 sar	 eax, 4
  059be	50		 push	 eax
  059bf	68 00 00 00 00	 push	 OFFSET $SG8322
  059c4	e8 00 00 00 00	 call	 _printf

; 10590: printf( "Railgun_Hasherezade_O8_BYTE_14bit performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);

  059c9	dd 05 00 00 00
	00		 fld	 QWORD PTR _TotalRoughSearchTime
  059cf	e8 00 00 00 00	 call	 __ftol2_sse
  059d4	8b c8		 mov	 ecx, eax
  059d6	c1 f9 04	 sar	 ecx, 4
  059d9	8b c6		 mov	 eax, esi
  059db	99		 cdq
  059dc	41		 inc	 ecx
  059dd	f7 f9		 idiv	 ecx
  059df	c1 f8 0a	 sar	 eax, 10			; 0000000aH
  059e2	50		 push	 eax
  059e3	68 00 00 00 00	 push	 OFFSET $SG8324
  059e8	e8 00 00 00 00	 call	 _printf

; 10591: // As one line: ]
; 10592: 
; 10593: 
; 10594: // As one line: [
; 10595: Railgunhits=0;
; 10596: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);

  059ed	56		 push	 esi
  059ee	57		 push	 edi
  059ef	68 00 00 00 00	 push	 OFFSET $SG8325
  059f4	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR _Railgunhits, 0
  059fe	e8 00 00 00 00	 call	 _printf

; 10597: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");

  05a03	68 00 00 00 00	 push	 OFFSET $SG8326
  05a08	e8 00 00 00 00	 call	 _printf
  05a0d	83 c4 24	 add	 esp, 36			; 00000024H

; 10598: clocks1 = clock();

  05a10	e8 00 00 00 00	 call	 _clock
  05a15	a3 00 00 00 00	 mov	 DWORD PTR _clocks1, eax
  05a1a	bb 10 00 00 00	 mov	 ebx, 16			; 00000010H
  05a1f	90		 npad	 1
$LL560@main:

; 10599:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10600: {
; 10601: //Search area is between Strng[0] .. Strng[n-1]
; 10602: 	FoundInPTR = volnitsky2(&Strng[0], &Pattern[0], Strnglen, Patternlen);

  05a20	57		 push	 edi
  05a21	56		 push	 esi
  05a22	8d 54 24 1c	 lea	 edx, DWORD PTR _Pattern$[esp+2052]
  05a26	52		 push	 edx
  05a27	55		 push	 ebp
  05a28	e8 00 00 00 00	 call	 _volnitsky2
  05a2d	83 c4 10	 add	 esp, 16			; 00000010H
  05a30	4b		 dec	 ebx
  05a31	75 ed		 jne	 SHORT $LL560@main

; 10603: }
; 10604: 	if (FoundInPTR != NULL)

  05a33	85 c0		 test	 eax, eax
  05a35	74 11		 je	 SHORT $LN557@main

; 10605: 	printf("The first instance occurred at position %d within next line:\n%s\n", (long)(FoundInPTR-Strng), FoundInPTR);

  05a37	50		 push	 eax
  05a38	2b c5		 sub	 eax, ebp
  05a3a	50		 push	 eax
  05a3b	68 00 00 00 00	 push	 OFFSET $SG8333
  05a40	e8 00 00 00 00	 call	 _printf
  05a45	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN557@main:

; 10606: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;

  05a48	e8 00 00 00 00	 call	 _clock
  05a4d	a3 00 00 00 00	 mov	 DWORD PTR _clocks2, eax
  05a52	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR _clocks1
  05a58	89 44 24 10	 mov	 DWORD PTR tv4593[esp+2044], eax
  05a5c	db 44 24 10	 fild	 DWORD PTR tv4593[esp+2044]
  05a60	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@3ff0000000000000
  05a66	dd 15 00 00 00
	00		 fst	 QWORD PTR _TotalRoughSearchTime

; 10607: printf( "volnitsky2_hits/volnitsky2_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));

  05a6c	e8 00 00 00 00	 call	 __ftol2_sse
  05a71	c1 f8 04	 sar	 eax, 4
  05a74	40		 inc	 eax
  05a75	50		 push	 eax
  05a76	a1 00 00 00 00	 mov	 eax, DWORD PTR _Railgunhits
  05a7b	c1 f8 04	 sar	 eax, 4
  05a7e	50		 push	 eax
  05a7f	68 00 00 00 00	 push	 OFFSET $SG8335
  05a84	e8 00 00 00 00	 call	 _printf

; 10608: printf( "volnitsky2 performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);

  05a89	dd 05 00 00 00
	00		 fld	 QWORD PTR _TotalRoughSearchTime
  05a8f	e8 00 00 00 00	 call	 __ftol2_sse
  05a94	8b c8		 mov	 ecx, eax
  05a96	c1 f9 04	 sar	 ecx, 4
  05a99	8b c6		 mov	 eax, esi
  05a9b	99		 cdq
  05a9c	41		 inc	 ecx
  05a9d	f7 f9		 idiv	 ecx
  05a9f	c1 f8 0a	 sar	 eax, 10			; 0000000aH
  05aa2	50		 push	 eax
  05aa3	68 00 00 00 00	 push	 OFFSET $SG8337
  05aa8	e8 00 00 00 00	 call	 _printf

; 10609: // As one line: ]
; 10610: 
; 10611: // As one line: [
; 10612: Railgunhits=0;
; 10613: printf( "\nDoing Search for Pattern(%dbytes) into String(%dbytes) as-one-line ...\n", Patternlen, Strnglen);

  05aad	56		 push	 esi
  05aae	57		 push	 edi
  05aaf	68 00 00 00 00	 push	 OFFSET $SG8338
  05ab4	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR _Railgunhits, 0
  05abe	e8 00 00 00 00	 call	 _printf

; 10614: printf( "WARNING! The next line works with BMH only for pattern 4[+] long, otherwise (for 2 and 3) other searcher takes over!\n");

  05ac3	68 00 00 00 00	 push	 OFFSET $SG8339
  05ac8	e8 00 00 00 00	 call	 _printf
  05acd	83 c4 24	 add	 esp, 36			; 00000024H

; 10615: clocks1 = clock();

  05ad0	e8 00 00 00 00	 call	 _clock
  05ad5	a3 00 00 00 00	 mov	 DWORD PTR _clocks1, eax
  05ada	bb 10 00 00 00	 mov	 ebx, 16			; 00000010H
  05adf	90		 npad	 1
$LL556@main:

; 10616:     for (Bozan=0; Bozan < (1<<4); Bozan++) // 16 times, at end >>4
; 10617: {
; 10618: //Search area is between Strng[0] .. Strng[n-1]
; 10619: 	FoundInPTR = volnitsky4(&Strng[0], &Pattern[0], Strnglen, Patternlen);

  05ae0	57		 push	 edi
  05ae1	56		 push	 esi
  05ae2	8d 54 24 1c	 lea	 edx, DWORD PTR _Pattern$[esp+2052]
  05ae6	52		 push	 edx
  05ae7	55		 push	 ebp
  05ae8	e8 00 00 00 00	 call	 _volnitsky4
  05aed	83 c4 10	 add	 esp, 16			; 00000010H
  05af0	4b		 dec	 ebx
  05af1	75 ed		 jne	 SHORT $LL556@main

; 10620: }
; 10621: 	if (FoundInPTR != NULL)

  05af3	5b		 pop	 ebx
  05af4	85 c0		 test	 eax, eax
  05af6	74 11		 je	 SHORT $LN553@main

; 10622: 	printf("The first instance occurred at position %d within next line:\n%s\n", (long)(FoundInPTR-Strng), FoundInPTR);

  05af8	50		 push	 eax
  05af9	2b c5		 sub	 eax, ebp
  05afb	50		 push	 eax
  05afc	68 00 00 00 00	 push	 OFFSET $SG8346
  05b01	e8 00 00 00 00	 call	 _printf
  05b06	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN553@main:

; 10623: clocks2 = clock(); TotalRoughSearchTime = clocks2 - clocks1; TotalRoughSearchTime++;

  05b09	e8 00 00 00 00	 call	 _clock
  05b0e	a3 00 00 00 00	 mov	 DWORD PTR _clocks2, eax
  05b13	2b 05 00 00 00
	00		 sub	 eax, DWORD PTR _clocks1
  05b19	89 44 24 0c	 mov	 DWORD PTR tv4573[esp+2040], eax
  05b1d	db 44 24 0c	 fild	 DWORD PTR tv4573[esp+2040]
  05b21	dc 05 00 00 00
	00		 fadd	 QWORD PTR __real@3ff0000000000000
  05b27	dd 15 00 00 00
	00		 fst	 QWORD PTR _TotalRoughSearchTime

; 10624: printf( "volnitsky4_hits/volnitsky4_clocks: %lu/%lu\n", Railgunhits>>4, 1+((long)(TotalRoughSearchTime)>>4));

  05b2d	e8 00 00 00 00	 call	 __ftol2_sse
  05b32	c1 f8 04	 sar	 eax, 4
  05b35	40		 inc	 eax
  05b36	50		 push	 eax
  05b37	a1 00 00 00 00	 mov	 eax, DWORD PTR _Railgunhits
  05b3c	c1 f8 04	 sar	 eax, 4
  05b3f	50		 push	 eax
  05b40	68 00 00 00 00	 push	 OFFSET $SG8348
  05b45	e8 00 00 00 00	 call	 _printf

; 10625: printf( "volnitsky4 performance: %luKB/clock\n", (Strnglen/(1+((long)(TotalRoughSearchTime)>>4)))>>10);

  05b4a	dd 05 00 00 00
	00		 fld	 QWORD PTR _TotalRoughSearchTime
  05b50	e8 00 00 00 00	 call	 __ftol2_sse
  05b55	8b c8		 mov	 ecx, eax
  05b57	c1 f9 04	 sar	 ecx, 4
  05b5a	8b c6		 mov	 eax, esi
  05b5c	99		 cdq
  05b5d	41		 inc	 ecx
  05b5e	f7 f9		 idiv	 ecx
  05b60	c1 f8 0a	 sar	 eax, 10			; 0000000aH
  05b63	50		 push	 eax
  05b64	68 00 00 00 00	 push	 OFFSET $SG8350
  05b69	e8 00 00 00 00	 call	 _printf
  05b6e	83 c4 14	 add	 esp, 20			; 00000014H

; 10626: // As one line: ]
; 10627: 
; 10628: 
; 10629: exit(0);

  05b71	6a 00		 push	 0
  05b73	e8 00 00 00 00	 call	 _exit
  05b78	5e		 pop	 esi
$LN603@main:
_main	ENDP
_TEXT	ENDS
END
