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

	TITLE	d:\Source Code\NC lib\regex\pcre_study.c
	.686P
	.XMM
	include listing.inc
	.model	flat

INCLUDELIB LIBCMTD
INCLUDELIB OLDNAMES

; Function compile flags: /Ogtpy
; File d:\source code\nc lib\regex\pcre_study.c
;	COMDAT _set_bit
_TEXT	SEGMENT
_caseless$ = 8						; size = 4
_cd$ = 12						; size = 4
_set_bit PROC						; COMDAT
; _start_bits$ = edi
; _c$ = eax

; 75   : {

	push	ebp
	mov	ebp, DWORD PTR _cd$[esp]

; 76   : start_bits[c/8] |= (1 << (c&7));

	mov	ecx, eax
	shr	ecx, 3
	push	esi
	lea	esi, DWORD PTR [ecx+edi]
	mov	ecx, eax
	and	ecx, 7
	mov	dl, 1
	shl	dl, cl
	or	BYTE PTR [esi], dl

; 77   : if (caseless && (cd->ctypes[c] & ctype_letter) != 0)

	cmp	DWORD PTR _caseless$[esp+4], 0
	je	SHORT $LN1@set_bit
	mov	ecx, DWORD PTR [ebp+12]
	test	BYTE PTR [eax+ecx], 2
	je	SHORT $LN1@set_bit

; 78   :   start_bits[cd->fcc[c]/8] |= (1 << (cd->fcc[c]&7));

	mov	edx, DWORD PTR [ebp+4]
	movzx	ecx, BYTE PTR [edx+eax]
	mov	eax, ecx
	and	ecx, 7
	mov	dl, 1
	shr	eax, 3
	shl	dl, cl
	add	eax, edi
	or	BYTE PTR [eax], dl
$LN1@set_bit:
	pop	esi
	pop	ebp

; 79   : }

	ret	0
_set_bit ENDP
; Function compile flags: /Ogtpy
_TEXT	ENDS
;	COMDAT _set_start_bits
_TEXT	SEGMENT
tv750 = -8						; size = 4
_yield$ = -4						; size = 4
_code$ = 8						; size = 4
_start_bits$ = 12					; size = 4
_caseless$ = 16						; size = 4
_utf8$ = 20						; size = 4
_cd$ = 24						; size = 4
_set_start_bits PROC					; COMDAT

; 110  : {

	sub	esp, 8
	push	ebx
	push	ebp
	push	esi

; 111  : register int c;
; 112  : int yield = SSB_DONE;

	mov	esi, DWORD PTR _cd$[esp+16]
	push	edi
	mov	edi, DWORD PTR _start_bits$[esp+20]
	mov	DWORD PTR _yield$[esp+24], 1
$LL102@set_start_:

; 113  : 
; 114  : #if 0
; 115  : /* ========================================================================= */
; 116  : /* The following comment and code was inserted in January 1999. In May 2006,
; 117  : when it was observed to cause compiler warnings about unused values, I took it
; 118  : out again. If anybody is still using OS/2, they will have to put it back
; 119  : manually. */
; 120  : 
; 121  : /* This next statement and the later reference to dummy are here in order to
; 122  : trick the optimizer of the IBM C compiler for OS/2 into generating correct
; 123  : code. Apparently IBM isn't going to fix the problem, and we would rather not
; 124  : disable optimization (in this module it actually makes a big difference, and
; 125  : the pcre module can use all the optimization it can get). */
; 126  : 
; 127  : volatile int dummy;
; 128  : /* ========================================================================= */
; 129  : #endif
; 130  : 
; 131  : do
; 132  :   {
; 133  :   const uschar *tcode = code + (((int)*code == OP_CBRA)? 3:1) + LINK_SIZE;

	mov	eax, DWORD PTR _code$[esp+20]
	xor	ecx, ecx
	cmp	BYTE PTR [eax], 94			; 0000005eH
	sete	cl
	lea	ecx, DWORD PTR [ecx+ecx+1]
	lea	ebp, DWORD PTR [ecx+eax+2]
	npad	5
$LL99@set_start_:

; 137  :     {
; 138  :     int rc;
; 139  :     switch(*tcode)

	movzx	eax, BYTE PTR [ebp]
	add	eax, -6					; fffffffaH
	cmp	eax, 97					; 00000061H
	ja	$LN95@set_start_
	movzx	edx, BYTE PTR $LN222@set_start_[eax]
	jmp	DWORD PTR $LN272@set_start_[edx*4]
$LN94@set_start_:

; 145  : 
; 146  :       /* If we hit a bracket or a positive lookahead assertion, recurse to set
; 147  :       bits from within the subpattern. If it can't find anything, we have to
; 148  :       give up. If it finds some mandatory character(s), we are done for this
; 149  :       branch. Otherwise, carry on scanning after the subpattern. */
; 150  : 
; 151  :       case OP_BRA:
; 152  :       case OP_SBRA:
; 153  :       case OP_CBRA:
; 154  :       case OP_SCBRA:
; 155  :       case OP_ONCE:
; 156  :       case OP_ASSERT:
; 157  :       rc = set_start_bits(tcode, start_bits, caseless, utf8, cd);

	mov	eax, DWORD PTR _utf8$[esp+20]
	mov	ecx, DWORD PTR _caseless$[esp+20]
	push	esi
	push	eax
	push	ecx
	push	edi
	push	ebp
	call	_set_start_bits
	add	esp, 20					; 00000014H

; 158  :       if (rc == SSB_FAIL) return SSB_FAIL;

	test	eax, eax
	je	$LN95@set_start_

; 159  :       if (rc == SSB_DONE) try_next = FALSE; else

	cmp	eax, 1
	je	$LN239@set_start_
$LL90@set_start_:

; 160  :         {
; 161  :         do tcode += GET(tcode, 1); while (*tcode == OP_ALT);

	xor	edx, edx
	mov	dh, BYTE PTR [ebp+1]
	mov	dl, BYTE PTR [ebp+2]
	add	ebp, edx
	cmp	BYTE PTR [ebp], 83			; 00000053H
	je	SHORT $LL90@set_start_
$LN43@set_start_:

; 162  :         tcode += 1 + LINK_SIZE;

	add	ebp, 3

; 163  :         }
; 164  :       break;

	jmp	SHORT $LL99@set_start_
$LN85@set_start_:

; 182  : 
; 183  :       /* Skip over callout */
; 184  : 
; 185  :       case OP_CALLOUT:
; 186  :       tcode += 2 + 2*LINK_SIZE;

	add	ebp, 6

; 187  :       break;

	jmp	SHORT $LL99@set_start_
	npad	2
$LL83@set_start_:

; 188  : 
; 189  :       /* Skip over lookbehind and negative lookahead assertions */
; 190  : 
; 191  :       case OP_ASSERT_NOT:
; 192  :       case OP_ASSERTBACK:
; 193  :       case OP_ASSERTBACK_NOT:
; 194  :       do tcode += GET(tcode, 1); while (*tcode == OP_ALT);

	xor	eax, eax
	mov	ah, BYTE PTR [ebp+1]
	mov	al, BYTE PTR [ebp+2]
	add	ebp, eax
	cmp	BYTE PTR [ebp], 83			; 00000053H
	je	SHORT $LL83@set_start_

; 195  :       tcode += 1 + LINK_SIZE;

	add	ebp, 3

; 196  :       break;

	jmp	SHORT $LL99@set_start_
$LN80@set_start_:

; 197  : 
; 198  :       /* Skip over an option setting, changing the caseless flag */
; 199  : 
; 200  :       case OP_OPT:
; 201  :       caseless = (tcode[1] & PCRE_CASELESS) != 0;

	movzx	ecx, BYTE PTR [ebp+1]
	and	ecx, 1
	mov	DWORD PTR _caseless$[esp+20], ecx

; 202  :       tcode += 2;

	add	ebp, 2

; 203  :       break;

	jmp	$LL99@set_start_
$LN79@set_start_:

; 204  : 
; 205  :       /* BRAZERO does the bracket, but carries on. */
; 206  : 
; 207  :       case OP_BRAZERO:
; 208  :       case OP_BRAMINZERO:
; 209  :       if (set_start_bits(++tcode, start_bits, caseless, utf8, cd) == SSB_FAIL)

	mov	edx, DWORD PTR _utf8$[esp+20]
	mov	eax, DWORD PTR _caseless$[esp+20]
	push	esi
	push	edx
	push	eax
	add	ebp, 1
	push	edi
	push	ebp
	call	_set_start_bits
	add	esp, 20					; 00000014H
	test	eax, eax
	je	$LN95@set_start_
$LL77@set_start_:

; 210  :         return SSB_FAIL;
; 211  : /* =========================================================================
; 212  :       See the comment at the head of this function concerning the next line,
; 213  :       which was an old fudge for the benefit of OS/2.
; 214  :       dummy = 1;
; 215  :   ========================================================================= */
; 216  :       do tcode += GET(tcode,1); while (*tcode == OP_ALT);

	xor	ecx, ecx
	mov	ch, BYTE PTR [ebp+1]
	mov	cl, BYTE PTR [ebp+2]
	add	ebp, ecx
	cmp	BYTE PTR [ebp], 83			; 00000053H
	je	SHORT $LL77@set_start_

; 217  :       tcode += 1 + LINK_SIZE;

	add	ebp, 3

; 218  :       break;

	jmp	$LL99@set_start_
$LN74@set_start_:

; 219  : 
; 220  :       /* Single-char * or ? sets the bit and tries the next item */
; 221  : 
; 222  :       case OP_STAR:
; 223  :       case OP_MINSTAR:
; 224  :       case OP_POSSTAR:
; 225  :       case OP_QUERY:
; 226  :       case OP_MINQUERY:
; 227  :       case OP_POSQUERY:
; 228  :       set_bit(start_bits, tcode[1], caseless, cd);

	movzx	eax, BYTE PTR [ebp+1]
	mov	ecx, eax
	and	ecx, 7
	mov	bl, 1
	mov	edx, eax
	shl	bl, cl
	shr	edx, 3
	add	edx, edi
	or	BYTE PTR [edx], bl
	cmp	DWORD PTR _caseless$[esp+20], 0
	je	SHORT $LN242@set_start_
	mov	ecx, DWORD PTR [esi+12]
	test	BYTE PTR [eax+ecx], 2
	je	SHORT $LN242@set_start_
	mov	edx, DWORD PTR [esi+4]
	movzx	ecx, BYTE PTR [edx+eax]
	mov	eax, ecx
	and	ecx, 7
	mov	dl, 1
	shr	eax, 3
	shl	dl, cl
	add	eax, edi
	or	BYTE PTR [eax], dl
$LN242@set_start_:

; 229  :       tcode += 2;

	add	ebp, 2

; 230  : #ifdef SUPPORT_UTF8
; 231  :       if (utf8 && tcode[-1] >= 0xc0)
; 232  :         tcode += _pcre_utf8_table4[tcode[-1] & 0x3f];
; 233  : #endif
; 234  :       break;

	jmp	$LL99@set_start_
$LN73@set_start_:

; 235  : 
; 236  :       /* Single-char upto sets the bit and tries the next */
; 237  : 
; 238  :       case OP_UPTO:
; 239  :       case OP_MINUPTO:
; 240  :       case OP_POSUPTO:
; 241  :       set_bit(start_bits, tcode[3], caseless, cd);

	movzx	eax, BYTE PTR [ebp+3]
	mov	ecx, eax
	shr	ecx, 3
	lea	edx, DWORD PTR [ecx+edi]
	mov	ecx, eax
	and	ecx, 7
	mov	bl, 1
	shl	bl, cl
	or	BYTE PTR [edx], bl
	cmp	DWORD PTR _caseless$[esp+20], 0
	je	SHORT $LN240@set_start_
	mov	edx, DWORD PTR [esi+12]
	test	BYTE PTR [eax+edx], 2
	je	SHORT $LN240@set_start_
	mov	ecx, DWORD PTR [esi+4]
	movzx	ecx, BYTE PTR [ecx+eax]
	mov	edx, ecx
	shr	edx, 3
	lea	eax, DWORD PTR [edx+edi]
	and	ecx, 7
	mov	dl, 1
	shl	dl, cl
	or	BYTE PTR [eax], dl
$LN240@set_start_:

; 242  :       tcode += 4;

	add	ebp, 4

; 243  : #ifdef SUPPORT_UTF8
; 244  :       if (utf8 && tcode[-1] >= 0xc0)
; 245  :         tcode += _pcre_utf8_table4[tcode[-1] & 0x3f];
; 246  : #endif
; 247  :       break;

	jmp	$LL99@set_start_
$LN42@set_start_:

; 312  :       try_next = FALSE;
; 313  :       break;
; 314  : 
; 315  :       /* One or more character type fudges the pointer and restarts, knowing
; 316  :       it will hit a single character type and stop there. */
; 317  : 
; 318  :       case OP_TYPEPLUS:
; 319  :       case OP_TYPEMINPLUS:
; 320  :       tcode++;
; 321  :       break;
; 322  : 
; 323  :       case OP_TYPEEXACT:
; 324  :       tcode += 3;
; 325  :       break;
; 326  : 
; 327  :       /* Zero or more repeats of character types set the bits and then
; 328  :       try again. */
; 329  : 
; 330  :       case OP_TYPEUPTO:
; 331  :       case OP_TYPEMINUPTO:
; 332  :       case OP_TYPEPOSUPTO:
; 333  :       tcode += 2;               /* Fall through */

	add	ebp, 2
$LN41@set_start_:

; 334  : 
; 335  :       case OP_TYPESTAR:
; 336  :       case OP_TYPEMINSTAR:
; 337  :       case OP_TYPEPOSSTAR:
; 338  :       case OP_TYPEQUERY:
; 339  :       case OP_TYPEMINQUERY:
; 340  :       case OP_TYPEPOSQUERY:
; 341  :       switch(tcode[1])

	movzx	eax, BYTE PTR [ebp+1]
	add	eax, -6					; fffffffaH
	cmp	eax, 6
	ja	$LN171@set_start_
	jmp	DWORD PTR $LN273@set_start_[eax*4]
$LN37@set_start_:

; 342  :         {
; 343  :         case OP_ANY:
; 344  :         return SSB_FAIL;
; 345  : 
; 346  :         case OP_NOT_DIGIT:
; 347  :         for (c = 0; c < 32; c++)

	or	edx, -1
	lea	eax, DWORD PTR [edi+1]
	sub	edx, edi
	npad	2
$LL36@set_start_:

; 348  :           start_bits[c] |= ~cd->cbits[c+cbit_digit];

	mov	ebx, DWORD PTR [esi+8]
	lea	ecx, DWORD PTR [edx+eax]
	movzx	ebx, BYTE PTR [ecx+ebx+64]
	not	bl
	or	BYTE PTR [eax-1], bl
	mov	ebx, DWORD PTR [esi+8]
	movzx	ebx, BYTE PTR [ecx+ebx+65]
	not	bl
	or	BYTE PTR [eax], bl
	mov	ebx, DWORD PTR [esi+8]
	movzx	ebx, BYTE PTR [ecx+ebx+66]
	not	bl
	or	BYTE PTR [eax+1], bl
	mov	ebx, DWORD PTR [esi+8]
	mov	cl, BYTE PTR [ecx+ebx+67]
	not	cl
	or	BYTE PTR [eax+2], cl
	add	eax, 4
	lea	ecx, DWORD PTR [edx+eax]
	cmp	ecx, 32					; 00000020H
	jl	SHORT $LL36@set_start_

; 388  :         break;
; 389  :         }
; 390  : 
; 391  :       tcode += 2;

	add	ebp, 2

; 392  :       break;

	jmp	$LL99@set_start_
$LN33@set_start_:

; 349  :         break;
; 350  : 
; 351  :         case OP_DIGIT:
; 352  :         for (c = 0; c < 32; c++)

	or	edx, -1
	lea	eax, DWORD PTR [edi+1]
	sub	edx, edi
$LL32@set_start_:

; 353  :           start_bits[c] |= cd->cbits[c+cbit_digit];

	mov	ebx, DWORD PTR [esi+8]
	lea	ecx, DWORD PTR [eax+edx]
	movzx	ebx, BYTE PTR [ecx+ebx+64]
	or	BYTE PTR [eax-1], bl
	mov	ebx, DWORD PTR [esi+8]
	movzx	ebx, BYTE PTR [ecx+ebx+65]
	or	BYTE PTR [eax], bl
	mov	ebx, DWORD PTR [esi+8]
	movzx	ebx, BYTE PTR [ecx+ebx+66]
	or	BYTE PTR [eax+1], bl
	mov	ebx, DWORD PTR [esi+8]
	mov	cl, BYTE PTR [ecx+ebx+67]
	or	BYTE PTR [eax+2], cl
	add	eax, 4
	lea	ecx, DWORD PTR [eax+edx]
	cmp	ecx, 32					; 00000020H
	jl	SHORT $LL32@set_start_

; 388  :         break;
; 389  :         }
; 390  : 
; 391  :       tcode += 2;

	add	ebp, 2

; 392  :       break;

	jmp	$LL99@set_start_
$LN29@set_start_:

; 354  :         break;
; 355  : 
; 356  :         /* The cbit_space table has vertical tab as whitespace; we have to
; 357  :         discard it. */
; 358  : 
; 359  :         case OP_NOT_WHITESPACE:
; 360  :         for (c = 0; c < 32; c++)

	xor	eax, eax
$LL28@set_start_:

; 361  :           {
; 362  :           int d = cd->cbits[c+cbit_space];
; 363  :           if (c == 1) d &= ~0x08;

	cmp	eax, 1
	mov	edx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [edx+eax]
	jne	SHORT $LN245@set_start_
	and	ecx, -9					; fffffff7H
$LN245@set_start_:

; 364  :           start_bits[c] |= ~d;

	not	cl
	or	BYTE PTR [eax+edi], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+1]
	lea	edx, DWORD PTR [eax+1]
	cmp	edx, 1
	jne	SHORT $LN249@set_start_

; 361  :           {
; 362  :           int d = cd->cbits[c+cbit_space];
; 363  :           if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN249@set_start_:

; 364  :           start_bits[c] |= ~d;

	not	cl
	or	BYTE PTR [edi+eax+1], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+2]
	lea	edx, DWORD PTR [eax+2]
	cmp	edx, 1
	jne	SHORT $LN253@set_start_

; 361  :           {
; 362  :           int d = cd->cbits[c+cbit_space];
; 363  :           if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN253@set_start_:

; 364  :           start_bits[c] |= ~d;

	not	cl
	or	BYTE PTR [edi+eax+2], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+3]
	lea	edx, DWORD PTR [eax+3]
	cmp	edx, 1
	jne	SHORT $LN165@set_start_

; 361  :           {
; 362  :           int d = cd->cbits[c+cbit_space];
; 363  :           if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN165@set_start_:

; 364  :           start_bits[c] |= ~d;

	not	cl
	or	BYTE PTR [edi+eax+3], cl
	add	eax, 4
	cmp	eax, 32					; 00000020H
	jl	SHORT $LL28@set_start_

; 388  :         break;
; 389  :         }
; 390  : 
; 391  :       tcode += 2;

	add	ebp, 2

; 392  :       break;

	jmp	$LL99@set_start_
$LN24@set_start_:

; 365  :           }
; 366  :         break;
; 367  : 
; 368  :         /* The cbit_space table has vertical tab as whitespace; we have to
; 369  :         discard it. */
; 370  : 
; 371  :         case OP_WHITESPACE:
; 372  :         for (c = 0; c < 32; c++)

	xor	eax, eax
$LL23@set_start_:

; 373  :           {
; 374  :           int d = cd->cbits[c+cbit_space];
; 375  :           if (c == 1) d &= ~0x08;

	cmp	eax, 1
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax]
	jne	SHORT $LN246@set_start_
	and	ecx, -9					; fffffff7H
$LN246@set_start_:

; 376  :           start_bits[c] |= d;

	or	BYTE PTR [eax+edi], cl
	mov	edx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [edx+eax+1]
	lea	edx, DWORD PTR [eax+1]
	cmp	edx, 1
	jne	SHORT $LN250@set_start_

; 373  :           {
; 374  :           int d = cd->cbits[c+cbit_space];
; 375  :           if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN250@set_start_:

; 376  :           start_bits[c] |= d;

	or	BYTE PTR [edi+eax+1], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+2]
	lea	edx, DWORD PTR [eax+2]
	cmp	edx, 1
	jne	SHORT $LN254@set_start_

; 373  :           {
; 374  :           int d = cd->cbits[c+cbit_space];
; 375  :           if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN254@set_start_:

; 376  :           start_bits[c] |= d;

	or	BYTE PTR [edi+eax+2], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+3]
	lea	edx, DWORD PTR [eax+3]
	cmp	edx, 1
	jne	SHORT $LN169@set_start_

; 373  :           {
; 374  :           int d = cd->cbits[c+cbit_space];
; 375  :           if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN169@set_start_:

; 376  :           start_bits[c] |= d;

	or	BYTE PTR [edi+eax+3], cl
	add	eax, 4
	cmp	eax, 32					; 00000020H
	jl	SHORT $LL23@set_start_

; 388  :         break;
; 389  :         }
; 390  : 
; 391  :       tcode += 2;

	add	ebp, 2

; 392  :       break;

	jmp	$LL99@set_start_
$LN19@set_start_:

; 377  :           }
; 378  :         break;
; 379  : 
; 380  :         case OP_NOT_WORDCHAR:
; 381  :         for (c = 0; c < 32; c++)

	or	edx, -1
	lea	eax, DWORD PTR [edi+1]
	sub	edx, edi
$LL18@set_start_:

; 382  :           start_bits[c] |= ~cd->cbits[c+cbit_word];

	mov	ebx, DWORD PTR [esi+8]
	lea	ecx, DWORD PTR [eax+edx]
	movzx	ebx, BYTE PTR [ecx+ebx+160]
	not	bl
	or	BYTE PTR [eax-1], bl
	mov	ebx, DWORD PTR [esi+8]
	movzx	ebx, BYTE PTR [ecx+ebx+161]
	not	bl
	or	BYTE PTR [eax], bl
	mov	ebx, DWORD PTR [esi+8]
	movzx	ebx, BYTE PTR [ecx+ebx+162]
	not	bl
	or	BYTE PTR [eax+1], bl
	mov	ebx, DWORD PTR [esi+8]
	mov	cl, BYTE PTR [ecx+ebx+163]
	not	cl
	or	BYTE PTR [eax+2], cl
	add	eax, 4
	lea	ecx, DWORD PTR [eax+edx]
	cmp	ecx, 32					; 00000020H
	jl	SHORT $LL18@set_start_

; 388  :         break;
; 389  :         }
; 390  : 
; 391  :       tcode += 2;

	add	ebp, 2

; 392  :       break;

	jmp	$LL99@set_start_
$LN15@set_start_:

; 383  :         break;
; 384  : 
; 385  :         case OP_WORDCHAR:
; 386  :         for (c = 0; c < 32; c++)

	or	edx, -1
	lea	eax, DWORD PTR [edi+1]
	sub	edx, edi
	npad	2
$LL14@set_start_:

; 387  :           start_bits[c] |= cd->cbits[c+cbit_word];

	mov	ebx, DWORD PTR [esi+8]
	lea	ecx, DWORD PTR [eax+edx]
	movzx	ebx, BYTE PTR [ecx+ebx+160]
	or	BYTE PTR [eax-1], bl
	mov	ebx, DWORD PTR [esi+8]
	movzx	ebx, BYTE PTR [ecx+ebx+161]
	or	BYTE PTR [eax], bl
	mov	ebx, DWORD PTR [esi+8]
	movzx	ebx, BYTE PTR [ecx+ebx+162]
	or	BYTE PTR [eax+1], bl
	mov	ebx, DWORD PTR [esi+8]
	mov	cl, BYTE PTR [ecx+ebx+163]
	or	BYTE PTR [eax+2], cl
	add	eax, 4
	lea	ecx, DWORD PTR [eax+edx]
	cmp	ecx, 32					; 00000020H
	jl	SHORT $LL14@set_start_
$LN171@set_start_:

; 388  :         break;
; 389  :         }
; 390  : 
; 391  :       tcode += 2;

	add	ebp, 2

; 392  :       break;

	jmp	$LL99@set_start_
$LN11@set_start_:

; 393  : 
; 394  :       /* Character class where all the information is in a bit map: set the
; 395  :       bits and either carry on or not, according to the repeat count. If it was
; 396  :       a negative class, and we are operating with UTF-8 characters, any byte
; 397  :       with a value >= 0xc4 is a potentially valid starter because it starts a
; 398  :       character with a value > 255. */
; 399  : 
; 400  :       case OP_NCLASS:
; 401  : #ifdef SUPPORT_UTF8
; 402  :       if (utf8)
; 403  :         {
; 404  :         start_bits[24] |= 0xf0;              /* Bits for 0xc4 - 0xc8 */
; 405  :         memset(start_bits+25, 0xff, 7);      /* Bits for 0xc9 - 0xff */
; 406  :         }
; 407  : #endif
; 408  :       /* Fall through */
; 409  : 
; 410  :       case OP_CLASS:
; 411  :         {
; 412  :         tcode++;

	add	ebp, 1

; 413  : 
; 414  :         /* In UTF-8 mode, the bits in a bit map correspond to character
; 415  :         values, not to byte values. However, the bit map we are constructing is
; 416  :         for byte values. So we have to do a conversion for characters whose
; 417  :         value is > 127. In fact, there are only two possible starting bytes for
; 418  :         characters in the range 128 - 255. */
; 419  : 
; 420  : #ifdef SUPPORT_UTF8
; 421  :         if (utf8)
; 422  :           {
; 423  :           for (c = 0; c < 16; c++) start_bits[c] |= tcode[c];
; 424  :           for (c = 128; c < 256; c++)
; 425  :             {
; 426  :             if ((tcode[c/8] && (1 << (c&7))) != 0)
; 427  :               {
; 428  :               int d = (c >> 6) | 0xc0;            /* Set bit for this starter */
; 429  :               start_bits[d/8] |= (1 << (d&7));    /* and then skip on to the */
; 430  :               c = (c & 0xc0) + 0x40 - 1;          /* next relevant character. */
; 431  :               }
; 432  :             }
; 433  :           }
; 434  : 
; 435  :         /* In non-UTF-8 mode, the two bit maps are completely compatible. */
; 436  : 
; 437  :         else
; 438  : #endif
; 439  :           {
; 440  :           for (c = 0; c < 32; c++) start_bits[c] |= tcode[c];

	mov	edx, edi
	lea	eax, DWORD PTR [edi+1]
	lea	ecx, DWORD PTR [ebp+2]
	sub	edx, ebp
	mov	DWORD PTR tv750[esp+24], 8
$LL10@set_start_:
	movzx	ebx, BYTE PTR [ecx-2]
	or	BYTE PTR [eax-1], bl
	movzx	ebx, BYTE PTR [ecx-1]
	or	BYTE PTR [eax], bl
	movzx	ebx, BYTE PTR [ecx]
	or	BYTE PTR [edx+ecx], bl
	movzx	ebx, BYTE PTR [ecx+1]
	or	BYTE PTR [eax+2], bl
	add	eax, 4
	add	ecx, 4
	sub	DWORD PTR tv750[esp+24], 1
	jne	SHORT $LL10@set_start_

; 441  :           }
; 442  : 
; 443  :         /* Advance past the bit map, and act on what follows */
; 444  : 
; 445  :         tcode += 32;
; 446  :         switch (*tcode)

	movzx	eax, BYTE PTR [ebp+32]
	add	ebp, 32					; 00000020H
	add	eax, -69				; ffffffbbH
	cmp	eax, 7
	ja	$LN239@set_start_
	movzx	edx, BYTE PTR $LN223@set_start_[eax]
	jmp	DWORD PTR $LN274@set_start_[edx*4]
$LN5@set_start_:

; 447  :           {
; 448  :           case OP_CRSTAR:
; 449  :           case OP_CRMINSTAR:
; 450  :           case OP_CRQUERY:
; 451  :           case OP_CRMINQUERY:
; 452  :           tcode++;

	add	ebp, 1

; 453  :           break;

	jmp	$LL99@set_start_
$LN4@set_start_:

; 454  : 
; 455  :           case OP_CRRANGE:
; 456  :           case OP_CRMINRANGE:
; 457  :           if (((tcode[1] << 8) + tcode[2]) == 0) tcode += 5;

	movzx	eax, BYTE PTR [ebp+1]
	movzx	ecx, BYTE PTR [ebp+2]
	shl	eax, 8
	add	eax, ecx
	jne	$LN239@set_start_
	add	ebp, 5

; 134  :   BOOL try_next = TRUE;
; 135  : 
; 136  :   while (try_next)    /* Loop for items in this branch */

	jmp	$LL99@set_start_
$LN87@set_start_:

; 165  : 
; 166  :       /* If we hit ALT or KET, it means we haven't found anything mandatory in
; 167  :       this branch, though we might have found something optional. For ALT, we
; 168  :       continue with the next alternative, but we have to arrange that the final
; 169  :       result from subpattern is SSB_CONTINUE rather than SSB_DONE. For KET,
; 170  :       return SSB_CONTINUE: if this is the top level, that indicates failure,
; 171  :       but after a nested subpattern, it causes scanning to continue. */
; 172  : 
; 173  :       case OP_ALT:
; 174  :       yield = SSB_CONTINUE;

	mov	DWORD PTR _yield$[esp+24], 2

; 175  :       try_next = FALSE;
; 176  :       break;

	jmp	$LN239@set_start_
$LN72@set_start_:

; 248  : 
; 249  :       /* At least one single char sets the bit and stops */
; 250  : 
; 251  :       case OP_EXACT:       /* Fall through */
; 252  :       tcode += 2;

	add	ebp, 2
$LN244@set_start_:

; 253  : 
; 254  :       case OP_CHAR:
; 255  :       case OP_CHARNC:
; 256  :       case OP_PLUS:
; 257  :       case OP_MINPLUS:
; 258  :       case OP_POSPLUS:
; 259  :       set_bit(start_bits, tcode[1], caseless, cd);

	movzx	eax, BYTE PTR [ebp+1]
	mov	edx, eax
	shr	edx, 3
	lea	ebp, DWORD PTR [edx+edi]
	mov	ecx, eax
	and	ecx, 7
	mov	dl, 1
	shl	dl, cl
	or	BYTE PTR [ebp], dl
	cmp	DWORD PTR _caseless$[esp+20], 0
	je	$LN239@set_start_
	mov	ecx, DWORD PTR [esi+12]
	test	BYTE PTR [eax+ecx], 2
	je	$LN239@set_start_
	mov	edx, DWORD PTR [esi+4]
	movzx	ecx, BYTE PTR [edx+eax]
	mov	eax, ecx
	and	ecx, 7
	mov	dl, 1
	shr	eax, 3
	shl	dl, cl
	add	eax, edi
	or	BYTE PTR [eax], dl

; 260  :       try_next = FALSE;
; 261  :       break;

	jmp	$LN239@set_start_
$LN70@set_start_:

; 262  : 
; 263  :       /* Single character type sets the bits and stops */
; 264  : 
; 265  :       case OP_NOT_DIGIT:
; 266  :       for (c = 0; c < 32; c++)

	or	ebp, -1
	lea	eax, DWORD PTR [edi+1]
	sub	ebp, edi
$LL69@set_start_:

; 267  :         start_bits[c] |= ~cd->cbits[c+cbit_digit];

	mov	edx, DWORD PTR [esi+8]
	lea	ecx, DWORD PTR [eax+ebp]
	movzx	edx, BYTE PTR [edx+ecx+64]
	not	dl
	or	BYTE PTR [eax-1], dl
	mov	edx, DWORD PTR [esi+8]
	movzx	edx, BYTE PTR [edx+ecx+65]
	not	dl
	or	BYTE PTR [eax], dl
	mov	edx, DWORD PTR [esi+8]
	movzx	edx, BYTE PTR [edx+ecx+66]
	not	dl
	or	BYTE PTR [eax+1], dl
	mov	edx, DWORD PTR [esi+8]
	mov	cl, BYTE PTR [edx+ecx+67]
	not	cl
	or	BYTE PTR [eax+2], cl
	add	eax, 4
	lea	edx, DWORD PTR [eax+ebp]
	cmp	edx, 32					; 00000020H
	jl	SHORT $LL69@set_start_

; 268  :       try_next = FALSE;
; 269  :       break;

	jmp	$LN239@set_start_
$LN66@set_start_:

; 270  : 
; 271  :       case OP_DIGIT:
; 272  :       for (c = 0; c < 32; c++)

	or	ebp, -1
	lea	eax, DWORD PTR [edi+1]
	sub	ebp, edi
	npad	3
$LL65@set_start_:

; 273  :         start_bits[c] |= cd->cbits[c+cbit_digit];

	mov	edx, DWORD PTR [esi+8]
	lea	ecx, DWORD PTR [eax+ebp]
	movzx	edx, BYTE PTR [edx+ecx+64]
	or	BYTE PTR [eax-1], dl
	mov	edx, DWORD PTR [esi+8]
	movzx	edx, BYTE PTR [edx+ecx+65]
	or	BYTE PTR [eax], dl
	mov	edx, DWORD PTR [esi+8]
	movzx	edx, BYTE PTR [edx+ecx+66]
	or	BYTE PTR [eax+1], dl
	mov	edx, DWORD PTR [esi+8]
	mov	cl, BYTE PTR [edx+ecx+67]
	or	BYTE PTR [eax+2], cl
	add	eax, 4
	lea	edx, DWORD PTR [eax+ebp]
	cmp	edx, 32					; 00000020H
	jl	SHORT $LL65@set_start_

; 274  :       try_next = FALSE;
; 275  :       break;

	jmp	$LN239@set_start_
$LN62@set_start_:

; 276  : 
; 277  :       /* The cbit_space table has vertical tab as whitespace; we have to
; 278  :       discard it. */
; 279  : 
; 280  :       case OP_NOT_WHITESPACE:
; 281  :       for (c = 0; c < 32; c++)

	xor	eax, eax
	npad	1
$LL61@set_start_:

; 282  :         {
; 283  :         int d = cd->cbits[c+cbit_space];
; 284  :         if (c == 1) d &= ~0x08;

	cmp	eax, 1
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax]
	jne	SHORT $LN247@set_start_
	and	ecx, -9					; fffffff7H
$LN247@set_start_:

; 285  :         start_bits[c] |= ~d;

	not	cl
	or	BYTE PTR [eax+edi], cl
	mov	edx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [edx+eax+1]
	lea	edx, DWORD PTR [eax+1]
	cmp	edx, 1
	jne	SHORT $LN251@set_start_

; 282  :         {
; 283  :         int d = cd->cbits[c+cbit_space];
; 284  :         if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN251@set_start_:

; 285  :         start_bits[c] |= ~d;

	not	cl
	or	BYTE PTR [edi+eax+1], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+2]
	lea	edx, DWORD PTR [eax+2]
	cmp	edx, 1
	jne	SHORT $LN255@set_start_

; 282  :         {
; 283  :         int d = cd->cbits[c+cbit_space];
; 284  :         if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN255@set_start_:

; 285  :         start_bits[c] |= ~d;

	not	cl
	or	BYTE PTR [edi+eax+2], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+3]
	lea	edx, DWORD PTR [eax+3]
	cmp	edx, 1
	jne	SHORT $LN153@set_start_

; 282  :         {
; 283  :         int d = cd->cbits[c+cbit_space];
; 284  :         if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN153@set_start_:

; 285  :         start_bits[c] |= ~d;

	not	cl
	or	BYTE PTR [edi+eax+3], cl
	add	eax, 4
	cmp	eax, 32					; 00000020H
	jl	SHORT $LL61@set_start_

; 286  :         }
; 287  :       try_next = FALSE;
; 288  :       break;

	jmp	$LN239@set_start_
$LN57@set_start_:

; 289  : 
; 290  :       /* The cbit_space table has vertical tab as whitespace; we have to
; 291  :       discard it. */
; 292  : 
; 293  :       case OP_WHITESPACE:
; 294  :       for (c = 0; c < 32; c++)

	xor	eax, eax
	npad	2
$LL56@set_start_:

; 295  :         {
; 296  :         int d = cd->cbits[c+cbit_space];
; 297  :         if (c == 1) d &= ~0x08;

	cmp	eax, 1
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax]
	jne	SHORT $LN248@set_start_
	and	ecx, -9					; fffffff7H
$LN248@set_start_:

; 298  :         start_bits[c] |= d;

	or	BYTE PTR [eax+edi], cl
	mov	edx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [edx+eax+1]
	lea	edx, DWORD PTR [eax+1]
	cmp	edx, 1
	jne	SHORT $LN252@set_start_

; 295  :         {
; 296  :         int d = cd->cbits[c+cbit_space];
; 297  :         if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN252@set_start_:

; 298  :         start_bits[c] |= d;

	or	BYTE PTR [edi+eax+1], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+2]
	lea	edx, DWORD PTR [eax+2]
	cmp	edx, 1
	jne	SHORT $LN256@set_start_

; 295  :         {
; 296  :         int d = cd->cbits[c+cbit_space];
; 297  :         if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN256@set_start_:

; 298  :         start_bits[c] |= d;

	or	BYTE PTR [edi+eax+2], cl
	mov	ecx, DWORD PTR [esi+8]
	movzx	ecx, BYTE PTR [ecx+eax+3]
	lea	edx, DWORD PTR [eax+3]
	cmp	edx, 1
	jne	SHORT $LN157@set_start_

; 295  :         {
; 296  :         int d = cd->cbits[c+cbit_space];
; 297  :         if (c == 1) d &= ~0x08;

	and	ecx, -9					; fffffff7H
$LN157@set_start_:

; 298  :         start_bits[c] |= d;

	or	BYTE PTR [edi+eax+3], cl
	add	eax, 4
	cmp	eax, 32					; 00000020H
	jl	SHORT $LL56@set_start_

; 299  :         }
; 300  :       try_next = FALSE;
; 301  :       break;

	jmp	$LN239@set_start_
$LN52@set_start_:

; 302  : 
; 303  :       case OP_NOT_WORDCHAR:
; 304  :       for (c = 0; c < 32; c++)

	or	ebp, -1
	lea	eax, DWORD PTR [edi+1]
	sub	ebp, edi
	npad	4
$LL51@set_start_:

; 305  :         start_bits[c] |= ~cd->cbits[c+cbit_word];

	mov	edx, DWORD PTR [esi+8]
	lea	ecx, DWORD PTR [eax+ebp]
	movzx	edx, BYTE PTR [edx+ecx+160]
	not	dl
	or	BYTE PTR [eax-1], dl
	mov	edx, DWORD PTR [esi+8]
	movzx	edx, BYTE PTR [edx+ecx+161]
	not	dl
	or	BYTE PTR [eax], dl
	mov	edx, DWORD PTR [esi+8]
	movzx	edx, BYTE PTR [edx+ecx+162]
	not	dl
	or	BYTE PTR [eax+1], dl
	mov	edx, DWORD PTR [esi+8]
	mov	cl, BYTE PTR [edx+ecx+163]
	not	cl
	or	BYTE PTR [eax+2], cl
	add	eax, 4
	lea	edx, DWORD PTR [eax+ebp]
	cmp	edx, 32					; 00000020H
	jl	SHORT $LL51@set_start_

; 306  :       try_next = FALSE;
; 307  :       break;

	jmp	SHORT $LN239@set_start_
$LN48@set_start_:

; 308  : 
; 309  :       case OP_WORDCHAR:
; 310  :       for (c = 0; c < 32; c++)

	or	ebp, -1
	lea	eax, DWORD PTR [edi+1]
	sub	ebp, edi
	npad	10
$LL47@set_start_:

; 311  :         start_bits[c] |= cd->cbits[c+cbit_word];

	mov	edx, DWORD PTR [esi+8]
	lea	ecx, DWORD PTR [eax+ebp]
	movzx	edx, BYTE PTR [ecx+edx+160]
	or	BYTE PTR [eax-1], dl
	mov	edx, DWORD PTR [esi+8]
	movzx	edx, BYTE PTR [ecx+edx+161]
	or	BYTE PTR [eax], dl
	mov	edx, DWORD PTR [esi+8]
	movzx	edx, BYTE PTR [ecx+edx+162]
	or	BYTE PTR [eax+1], dl
	mov	edx, DWORD PTR [esi+8]
	mov	cl, BYTE PTR [ecx+edx+163]
	or	BYTE PTR [eax+2], cl
	add	eax, 4
	lea	edx, DWORD PTR [eax+ebp]
	cmp	edx, 32					; 00000020H
	jl	SHORT $LL47@set_start_
$LN239@set_start_:

; 458  :             else try_next = FALSE;
; 459  :           break;
; 460  : 
; 461  :           default:
; 462  :           try_next = FALSE;
; 463  :           break;
; 464  :           }
; 465  :         }
; 466  :       break; /* End of bitmap class handling */
; 467  : 
; 468  :       }      /* End of switch */
; 469  :     }        /* End of try_next loop */
; 470  : 
; 471  :   code += GET(code, 1);   /* Advance to next branch */

	mov	eax, DWORD PTR _code$[esp+20]
	xor	ecx, ecx
	mov	ch, BYTE PTR [eax+1]
	mov	cl, BYTE PTR [eax+2]
	add	eax, ecx

; 472  :   }
; 473  : while (*code == OP_ALT);

	cmp	BYTE PTR [eax], 83			; 00000053H
	mov	DWORD PTR _code$[esp+20], eax
	je	$LL102@set_start_

; 474  : return yield;

	mov	eax, DWORD PTR _yield$[esp+24]
	pop	edi
	pop	esi
	pop	ebp
	pop	ebx

; 475  : }

	add	esp, 8
	ret	0
$LN86@set_start_:
	pop	edi
	pop	esi
	pop	ebp

; 177  : 
; 178  :       case OP_KET:
; 179  :       case OP_KETRMAX:
; 180  :       case OP_KETRMIN:
; 181  :       return SSB_CONTINUE;

	mov	eax, 2
	pop	ebx

; 475  : }

	add	esp, 8
	ret	0
$LN95@set_start_:
	pop	edi
	pop	esi
	pop	ebp

; 140  :       {
; 141  :       /* Fail if we reach something we don't understand */
; 142  : 
; 143  :       default:
; 144  :       return SSB_FAIL;

	xor	eax, eax
	pop	ebx

; 475  : }

	add	esp, 8
	ret	0
	npad	2
$LN272@set_start_:
	DD	$LN70@set_start_
	DD	$LN66@set_start_
	DD	$LN62@set_start_
	DD	$LN57@set_start_
	DD	$LN52@set_start_
	DD	$LN48@set_start_
	DD	$LN80@set_start_
	DD	$LN244@set_start_
	DD	$LN74@set_start_
	DD	$LN73@set_start_
	DD	$LN72@set_start_
	DD	$LN41@set_start_
	DD	$LN5@set_start_
	DD	$LN42@set_start_
	DD	$LN43@set_start_
	DD	$LN11@set_start_
	DD	$LN85@set_start_
	DD	$LN87@set_start_
	DD	$LN86@set_start_
	DD	$LN94@set_start_
	DD	$LL83@set_start_
	DD	$LN79@set_start_
	DD	$LN95@set_start_
$LN222@set_start_:
	DB	0
	DB	1
	DB	2
	DB	3
	DB	4
	DB	5
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	6
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	7
	DB	7
	DB	22					; 00000016H
	DB	8
	DB	8
	DB	7
	DB	7
	DB	8
	DB	8
	DB	9
	DB	9
	DB	10					; 0000000aH
	DB	8
	DB	7
	DB	8
	DB	9
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	11					; 0000000bH
	DB	11					; 0000000bH
	DB	12					; 0000000cH
	DB	12					; 0000000cH
	DB	11					; 0000000bH
	DB	11					; 0000000bH
	DB	13					; 0000000dH
	DB	13					; 0000000dH
	DB	14					; 0000000eH
	DB	11					; 0000000bH
	DB	22					; 00000016H
	DB	11					; 0000000bH
	DB	13					; 0000000dH
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	15					; 0000000fH
	DB	15					; 0000000fH
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	16					; 00000010H
	DB	17					; 00000011H
	DB	18					; 00000012H
	DB	18					; 00000012H
	DB	18					; 00000012H
	DB	19					; 00000013H
	DB	20					; 00000014H
	DB	20					; 00000014H
	DB	20					; 00000014H
	DB	22					; 00000016H
	DB	19					; 00000013H
	DB	19					; 00000013H
	DB	19					; 00000013H
	DB	22					; 00000016H
	DB	19					; 00000013H
	DB	19					; 00000013H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	22					; 00000016H
	DB	21					; 00000015H
	DB	21					; 00000015H
	npad	2
$LN273@set_start_:
	DD	$LN37@set_start_
	DD	$LN33@set_start_
	DD	$LN29@set_start_
	DD	$LN24@set_start_
	DD	$LN19@set_start_
	DD	$LN15@set_start_
	DD	$LN95@set_start_
$LN274@set_start_:
	DD	$LN5@set_start_
	DD	$LN4@set_start_
	DD	$LN239@set_start_
$LN223@set_start_:
	DB	0
	DB	0
	DB	2
	DB	2
	DB	0
	DB	0
	DB	1
	DB	1
_set_start_bits ENDP
_TEXT	ENDS
PUBLIC	??_C@_0CO@MDCINGKK@argument?5is?5not?5a?5compiled?5regul@ ; `string'
PUBLIC	??_C@_0BF@MNBKDEO@failed?5to?5get?5memory?$AA@	; `string'
PUBLIC	??_C@_0CH@KJMLKAHH@unknown?5or?5incorrect?5option?5bit?$CI@ ; `string'
PUBLIC	_pcre_study
EXTRN	_pcre_malloc:DWORD
EXTRN	_pcre_fullinfo:PROC
;	COMDAT ??_C@_0CO@MDCINGKK@argument?5is?5not?5a?5compiled?5regul@
CONST	SEGMENT
??_C@_0CO@MDCINGKK@argument?5is?5not?5a?5compiled?5regul@ DB 'argument is'
	DB	' not a compiled regular expression', 00H	; `string'
CONST	ENDS
;	COMDAT ??_C@_0BF@MNBKDEO@failed?5to?5get?5memory?$AA@
CONST	SEGMENT
??_C@_0BF@MNBKDEO@failed?5to?5get?5memory?$AA@ DB 'failed to get memory', 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_0CH@KJMLKAHH@unknown?5or?5incorrect?5option?5bit?$CI@
CONST	SEGMENT
??_C@_0CH@KJMLKAHH@unknown?5or?5incorrect?5option?5bit?$CI@ DB 'unknown o'
	DB	'r incorrect option bit(s) set', 00H		; `string'
; Function compile flags: /Ogtpy
CONST	ENDS
;	COMDAT _pcre_study
_TEXT	SEGMENT
_tables$ = -128						; size = 4
_start_bits$ = -124					; size = 32
_compile_block$ = -92					; size = 92
_external_re$ = 8					; size = 4
_options$ = 12						; size = 4
_errorptr$ = 16						; size = 4
_pcre_study PROC					; COMDAT

; 500  : {

	sub	esp, 128				; 00000080H
	push	ebx

; 501  : uschar start_bits[32];
; 502  : pcre_extra *extra;
; 503  : pcre_study_data *study;
; 504  : const uschar *tables;
; 505  : uschar *code;
; 506  : compile_data compile_block;
; 507  : const real_pcre *re = (const real_pcre *)external_re;
; 508  : 
; 509  : *errorptr = NULL;

	mov	ebx, DWORD PTR _errorptr$[esp+128]
	push	esi

; 510  : 
; 511  : if (re == NULL || re->magic_number != MAGIC_NUMBER)

	mov	esi, DWORD PTR _external_re$[esp+132]
	test	esi, esi
	mov	DWORD PTR [ebx], 0
	je	$LN7@pcre_study
	cmp	DWORD PTR [esi], 1346589253		; 50435245H
	jne	$LN7@pcre_study

; 515  :   }
; 516  : 
; 517  : if ((options & ~PUBLIC_STUDY_OPTIONS) != 0)

	cmp	DWORD PTR _options$[esp+132], 0
	je	SHORT $LN6@pcre_study
	pop	esi

; 518  :   {
; 519  :   *errorptr = "unknown or incorrect option bit(s) set";

	mov	DWORD PTR [ebx], OFFSET ??_C@_0CH@KJMLKAHH@unknown?5or?5incorrect?5option?5bit?$CI@

; 520  :   return NULL;

	xor	eax, eax
	pop	ebx

; 575  : 
; 576  : return extra;
; 577  : }

	add	esp, 128				; 00000080H
	ret	0
$LN6@pcre_study:

; 521  :   }
; 522  : 
; 523  : code = (uschar *)re + re->name_table_offset +
; 524  :   (re->name_count * re->name_entry_size);

	movzx	eax, WORD PTR [esi+28]
	movzx	ecx, WORD PTR [esi+26]
	imul	eax, ecx
	push	edi
	movzx	edi, WORD PTR [esi+24]
	add	eax, esi
	add	edi, eax

; 525  : 
; 526  : /* For an anchored pattern, or an unanchored pattern that has a first char, or
; 527  : a multiline pattern that matches only at "line starts", no further processing
; 528  : at present. */
; 529  : 
; 530  : if ((re->options & PCRE_ANCHORED) != 0 ||
; 531  :     (re->flags & (PCRE_FIRSTSET|PCRE_STARTLINE)) != 0)

	test	BYTE PTR [esi+8], 16			; 00000010H
	jne	$LN4@pcre_study
	test	BYTE PTR [esi+12], 10			; 0000000aH
	jne	$LN4@pcre_study

; 532  :   return NULL;
; 533  : 
; 534  : /* Set the character tables in the block that is passed around */
; 535  : 
; 536  : tables = re->tables;

	mov	eax, DWORD PTR [esi+32]

; 537  : if (tables == NULL)

	test	eax, eax
	mov	DWORD PTR _tables$[esp+140], eax
	jne	SHORT $LN3@pcre_study

; 538  :   (void)pcre_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
; 539  :   (void *)(&tables));

	lea	edx, DWORD PTR _tables$[esp+140]
	push	edx
	push	11					; 0000000bH
	push	eax
	push	esi
	call	_pcre_fullinfo
	mov	eax, DWORD PTR _tables$[esp+156]
	add	esp, 16					; 00000010H
$LN3@pcre_study:

; 540  : 
; 541  : compile_block.lcc = tables + lcc_offset;
; 542  : compile_block.fcc = tables + fcc_offset;

	lea	ecx, DWORD PTR [eax+256]

; 543  : compile_block.cbits = tables + cbits_offset;

	lea	edx, DWORD PTR [eax+512]
	mov	DWORD PTR _compile_block$[esp+140], eax

; 544  : compile_block.ctypes = tables + ctypes_offset;

	add	eax, 832				; 00000340H
	mov	DWORD PTR _compile_block$[esp+152], eax

; 545  : 
; 546  : /* See if we can find a fixed set of initial characters for the pattern. */
; 547  : 
; 548  : memset(start_bits, 0, 32 * sizeof(uschar));

	xor	eax, eax
	mov	DWORD PTR _start_bits$[esp+140], eax
	mov	DWORD PTR _start_bits$[esp+144], eax
	mov	DWORD PTR _start_bits$[esp+148], eax
	mov	DWORD PTR _start_bits$[esp+152], eax
	mov	DWORD PTR _start_bits$[esp+156], eax
	mov	DWORD PTR _start_bits$[esp+160], eax
	mov	DWORD PTR _start_bits$[esp+164], eax
	mov	DWORD PTR _start_bits$[esp+168], eax

; 549  : if (set_start_bits(code, start_bits, (re->options & PCRE_CASELESS) != 0,
; 550  :   (re->options & PCRE_UTF8) != 0, &compile_block) != SSB_DONE) return NULL;

	mov	eax, DWORD PTR [esi+8]
	mov	DWORD PTR _compile_block$[esp+148], edx
	mov	edx, eax
	mov	DWORD PTR _compile_block$[esp+144], ecx
	lea	ecx, DWORD PTR _compile_block$[esp+140]
	push	ecx
	shr	edx, 11					; 0000000bH
	and	edx, 1
	push	edx
	and	eax, 1
	push	eax
	lea	eax, DWORD PTR _start_bits$[esp+152]
	push	eax
	push	edi
	call	_set_start_bits
	add	esp, 20					; 00000014H
	cmp	eax, 1
	jne	SHORT $LN4@pcre_study

; 551  : 
; 552  : /* Get a pcre_extra block and a pcre_study_data block. The study data is put in
; 553  : the latter, which is pointed to by the former, which may also get additional
; 554  : data set later by the calling program. At the moment, the size of
; 555  : pcre_study_data is fixed. We nevertheless save it in a field for returning via
; 556  : the pcre_fullinfo() function so that if it becomes variable in the future, we
; 557  : don't have to change that code. */
; 558  : 
; 559  : extra = (pcre_extra *)(pcre_malloc)
; 560  :   (sizeof(pcre_extra) + sizeof(pcre_study_data));

	push	64					; 00000040H
	call	DWORD PTR _pcre_malloc
	add	esp, 4

; 561  : 
; 562  : if (extra == NULL)

	test	eax, eax
	jne	SHORT $LN1@pcre_study

; 563  :   {
; 564  :   *errorptr = "failed to get memory";

	mov	DWORD PTR [ebx], OFFSET ??_C@_0BF@MNBKDEO@failed?5to?5get?5memory?$AA@
$LN4@pcre_study:
	pop	edi
	pop	esi

; 565  :   return NULL;

	xor	eax, eax
	pop	ebx

; 575  : 
; 576  : return extra;
; 577  : }

	add	esp, 128				; 00000080H
	ret	0
$LN1@pcre_study:

; 566  :   }
; 567  : 
; 568  : study = (pcre_study_data *)((char *)extra + sizeof(pcre_extra));

	lea	ecx, DWORD PTR [eax+24]

; 569  : extra->flags = PCRE_EXTRA_STUDY_DATA;
; 570  : extra->study_data = study;

	mov	DWORD PTR [eax+4], ecx
	mov	DWORD PTR [eax], 1

; 571  : 
; 572  : study->size = sizeof(pcre_study_data);

	mov	DWORD PTR [ecx], 40			; 00000028H

; 573  : study->options = PCRE_STUDY_MAPPED;

	mov	DWORD PTR [ecx+4], 1

; 574  : memcpy(study->start_bits, start_bits, sizeof(start_bits));

	lea	edi, DWORD PTR [ecx+8]
	mov	ecx, 8
	lea	esi, DWORD PTR _start_bits$[esp+140]
	rep movsd
	pop	edi
	pop	esi
	pop	ebx

; 575  : 
; 576  : return extra;
; 577  : }

	add	esp, 128				; 00000080H
	ret	0
$LN7@pcre_study:
	pop	esi

; 512  :   {
; 513  :   *errorptr = "argument is not a compiled regular expression";

	mov	DWORD PTR [ebx], OFFSET ??_C@_0CO@MDCINGKK@argument?5is?5not?5a?5compiled?5regul@

; 514  :   return NULL;

	xor	eax, eax
	pop	ebx

; 575  : 
; 576  : return extra;
; 577  : }

	add	esp, 128				; 00000080H
	ret	0
_pcre_study ENDP
_TEXT	ENDS
END
