// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: regmatch
static int regmatch(regex_t *preg, int prog)
{
	int scan;
	int next;
	const char *save;

	scan = prog;

#ifdef DEBUG
	if (scan != 0 && regnarrate)
		fprintf(stderr, "%s(\n", regprop(scan));
#endif
	while (scan != 0) {
		int n;
		int c;
#ifdef DEBUG
		if (regnarrate) {
			fprintf(stderr, "%3d: %s...\n", scan, regprop(OP(preg, scan)));
		}
#endif
		next = regnext(preg, scan);
		n = reg_utf8_tounicode_case(preg->reginput, &c, (preg->cflags & REG_ICASE));

		switch (OP(preg, scan)) {
		case BOLX:
			if ((preg->eflags & REG_NOTBOL)) {
				return(0);
			}

		case BOL:
			if (preg->reginput != preg->regbol) {
				return(0);
			}
			break;
		case EOLX:
			if (c != 0) {

				return 0;
			}
			break;
		case EOL:
			if (!reg_iseol(preg, c)) {
				return(0);
			}
			break;
		case WORDA:

			if ((!isalnum(UCHAR(c))) && c != '_')
				return(0);

			if (preg->reginput > preg->regbol &&
				(isalnum(UCHAR(preg->reginput[-1])) || preg->reginput[-1] == '_'))
				return(0);
			break;
		case WORDZ:

			if (preg->reginput > preg->regbol) {

				if (reg_iseol(preg, c) || !(isalnum(UCHAR(c)) || c == '_')) {
					c = preg->reginput[-1];

					if (isalnum(UCHAR(c)) || c == '_') {
						break;
					}
				}
			}

			return(0);

		case ANY:
			if (reg_iseol(preg, c))
				return 0;
			preg->reginput += n;
			break;
		case EXACTLY: {
				int opnd;
				int len;
				int slen;

				opnd = OPERAND(scan);
				len = str_int_len(preg->program + opnd);

				slen = prefix_cmp(preg->program + opnd, len, preg->reginput, preg->cflags & REG_ICASE);
				if (slen < 0) {
					return(0);
				}
				preg->reginput += slen;
			}
			break;
		case ANYOF:
			if (reg_iseol(preg, c) || reg_range_find(preg->program + OPERAND(scan), c) == 0) {
				return(0);
			}
			preg->reginput += n;
			break;
		case ANYBUT:
			if (reg_iseol(preg, c) || reg_range_find(preg->program + OPERAND(scan), c) != 0) {
				return(0);
			}
			preg->reginput += n;
			break;
		case NOTHING:
			break;
		case BACK:
			break;
		case BRANCH:
			if (OP(preg, next) != BRANCH)
				next = OPERAND(scan);
			else {
				do {
					save = preg->reginput;
					if (regmatch(preg, OPERAND(scan))) {
						return(1);
					}
					preg->reginput = save;
					scan = regnext(preg, scan);
				} while (scan != 0 && OP(preg, scan) == BRANCH);
				return(0);

			}
			break;
		case REP:
		case REPMIN:
			return regmatchsimplerepeat(preg, scan, OP(preg, scan) == REPMIN);

		case REPX:
		case REPXMIN:
			return regmatchrepeat(preg, scan, OP(preg, scan) == REPXMIN);

		case END:
			return 1;

		case OPENNC:
		case CLOSENC:
			return regmatch(preg, next);

		default:
			if (OP(preg, scan) >= OPEN+1 && OP(preg, scan) < CLOSE_END) {
				save = preg->reginput;
				if (regmatch(preg, next)) {
					if (OP(preg, scan) < CLOSE) {
						int no = OP(preg, scan) - OPEN;
						if (no < preg->nmatch && preg->pmatch[no].rm_so == -1) {
							preg->pmatch[no].rm_so = save - preg->start;
						}
					}
					else {
						int no = OP(preg, scan) - CLOSE;
						if (no < preg->nmatch && preg->pmatch[no].rm_eo == -1) {
							preg->pmatch[no].rm_eo = save - preg->start;
						}
					}
					return(1);
				}

				preg->reginput = save;
				return(0);
			}
			return REG_ERR_INTERNAL;
		}

		scan = next;
	}

	return REG_ERR_INTERNAL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testl %esi, %esi
je 0x26398
movq 0x20(%rdi), %r8
movq %rdi, -0x30(%rbp)
movl 0x4(%rdi), %r9d
leaq 0x8(%r8), %rax
movq %rax, -0x38(%rbp)
movq 0x48(%rdi), %rdi
leaq 0x10(%r8), %rax
movq %rax, -0x60(%rbp)
leaq 0xc(%r8), %rax
movq %rax, -0x40(%rbp)
movl %esi, %r12d
movq %r8, -0x48(%rbp)
movl %r9d, -0x50(%rbp)
movslq %r12d, %r14
movl 0x4(%r8,%r14,4), %ebx
testl %ebx, %ebx
je 0x25f97
cmpl $0x7, (%r8,%r14,4)
jne 0x25f9b
movl %r12d, %eax
subl %ebx, %eax
jmp 0x25f9f
xorl %eax, %eax
jmp 0x25f9f
leal (%rbx,%r12), %eax
movb (%rdi), %dl
movzbl %dl, %r13d
testb $0x2, %r9b
movl %eax, -0x58(%rbp)
je 0x25fd9
movq %r12, %r15
movq %r14, %r12
movq %rdi, %r14
movl %r13d, %edi
movl %edx, %r13d
callq 0x60e0
movl %r13d, %edx
movl -0x50(%rbp), %r9d
movq -0x48(%rbp), %r8
movq %r14, %rdi
movq %r12, %r14
movq %r15, %r12
movl %eax, %r13d
movl (%r8,%r14,4), %r10d
cmpq $0x11, %r10
ja 0x262f8
leaq 0x16da(%rip), %rcx      # 0x276c8
movslq (%rcx,%r10,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, %r9b
jne 0x2615c
testl %r13d, %r13d
je 0x26283
jmp 0x266f3
testb $0x1, %r9b
jne 0x26145
testl %r13d, %r13d
jne 0x261b8
jmp 0x266f3
xorl %r15d, %r15d
movq -0x30(%rbp), %rax
cmpq 0x50(%rax), %rdi
jbe 0x2639e
movq %rdi, %rbx
testb $0x1, %r9b
jne 0x26218
testl %r13d, %r13d
jne 0x26233
jmp 0x26223
movq -0x38(%rbp), %rax
cmpl $0x0, (%rax,%r14,4)
je 0x26296
movq -0x40(%rbp), %rax
leaq (%rax,%r14,4), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx,%rax,4)
leaq 0x1(%rax), %rax
jne 0x2606c
jmp 0x26298
testb $0x1, %r9b
jne 0x26174
testl %r13d, %r13d
jne 0x2618a
jmp 0x266f3
movq %rdi, %rbx
callq 0x64e0
movq (%rax), %rax
xorl %r15d, %r15d
cmpl $0x5f, %r13d
je 0x260b8
movzbl %r13b, %ecx
movzwl (%rax,%rcx,2), %ecx
andl $0x8, %ecx
je 0x2639e
movq -0x30(%rbp), %rcx
movq %rbx, %rdi
cmpq 0x50(%rcx), %rbx
jbe 0x2627b
movzbl -0x1(%rdi), %ecx
cmpl $0x5f, %ecx
movq -0x48(%rbp), %r8
movl -0x50(%rbp), %r9d
je 0x2639e
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
je 0x26283
jmp 0x2639e
testb $0x1, %r9b
jne 0x261c8
testl %r13d, %r13d
jne 0x261de
jmp 0x266f3
movslq -0x58(%rbp), %rax
cmpl $0x6, (%r8,%rax,4)
je 0x264b5
addl $0x2, %r12d
movl %r12d, -0x58(%rbp)
jmp 0x26283
movq -0x30(%rbp), %rax
testb $0x10, 0x38(%rax)
jne 0x266f3
movq -0x30(%rbp), %rax
cmpq 0x50(%rax), %rdi
je 0x26283
jmp 0x266f3
xorl %r15d, %r15d
testl %r13d, %r13d
je 0x2639e
cmpl $0xa, %r13d
jne 0x261b8
jmp 0x2639e
testl %r13d, %r13d
je 0x26283
cmpl $0xa, %r13d
je 0x26283
jmp 0x266f3
xorl %r15d, %r15d
testl %r13d, %r13d
je 0x2639e
cmpl $0xa, %r13d
je 0x2639e
movl 0x8(%r8,%r14,4), %eax
testl %eax, %eax
je 0x261b8
movq -0x60(%rbp), %rcx
leaq (%rcx,%r14,4), %rcx
movl -0x4(%rcx), %edx
cmpl %r13d, %edx
jg 0x261ae
addl %eax, %edx
cmpl %r13d, %edx
jg 0x266f3
movl (%rcx), %eax
addq $0x8, %rcx
testl %eax, %eax
jne 0x2619b
incq %rdi
movq -0x30(%rbp), %rax
movq %rdi, 0x48(%rax)
jmp 0x26283
xorl %r15d, %r15d
testl %r13d, %r13d
je 0x2639e
cmpl $0xa, %r13d
je 0x2639e
movl 0x8(%r8,%r14,4), %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
je 0x2639e
movq -0x60(%rbp), %rax
leaq (%rax,%r14,4), %rax
movq -0x30(%rbp), %rsi
movl -0x4(%rax), %edx
cmpl %r13d, %edx
jg 0x26209
addl %ecx, %edx
cmpl %r13d, %edx
jg 0x2622a
movl (%rax), %ecx
addq $0x8, %rax
testl %ecx, %ecx
jne 0x261fa
jmp 0x2639e
testl %r13d, %r13d
je 0x26223
cmpl $0xa, %r13d
jne 0x26233
callq 0x64e0
jmp 0x26256
incq %rdi
movq %rdi, 0x48(%rsi)
jmp 0x26283
callq 0x64e0
cmpl $0x5f, %r13d
je 0x2639e
movq (%rax), %rcx
movzbl %r13b, %edx
movzwl (%rcx,%rdx,2), %ecx
andl $0x8, %ecx
jne 0x2639e
movq %rbx, %rdi
movzbl -0x1(%rbx), %ecx
cmpl $0x5f, %ecx
je 0x2627b
movq (%rax), %rax
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
movq -0x48(%rbp), %r8
movl -0x50(%rbp), %r9d
jne 0x26283
jmp 0x2639e
movq -0x48(%rbp), %r8
movl -0x50(%rbp), %r9d
movl -0x58(%rbp), %eax
movl %eax, %r12d
testl %eax, %eax
jne 0x25f7d
jmp 0x26398
xorl %eax, %eax
movq -0x38(%rbp), %rcx
leaq (%rcx,%r14,4), %r14
movl %eax, %ebx
xorl %r12d, %r12d
cmpl %r12d, %ebx
je 0x262e8
movzbl (%rdi,%r12), %eax
xorl %r15d, %r15d
testl %eax, %eax
je 0x2639e
testb $0x2, %r9b
je 0x262d5
movq %rdi, %r13
movl %eax, %edi
callq 0x60e0
movl -0x50(%rbp), %r9d
movq -0x48(%rbp), %r8
movq %r13, %rdi
leaq 0x1(%r12), %rcx
cmpl (%r14,%r12,4), %eax
movq %rcx, %r12
je 0x262a5
jmp 0x2639e
testl %ebx, %ebx
js 0x266f3
addq %rbx, %rdi
jmp 0x261bb
cmpl $0x3e8, %r10d           # imm = 0x3E8
je 0x2630e
cmpl $0x7d0, %r10d           # imm = 0x7D0
jne 0x2643a
movq -0x30(%rbp), %rdi
movl -0x58(%rbp), %esi
jmp 0x26390
movl 0x10(%r8,%r14,4), %eax
cmpl 0xc(%r8,%r14,4), %eax
jl 0x267e8
movl 0x8(%r8,%r14,4), %ecx
xorl %r15d, %r15d
cmpl %ecx, %eax
jg 0x2639e
cmpl $0xd, %r10d
je 0x2681b
cmpl %ecx, %eax
jge 0x26371
incl %eax
movl %eax, 0x10(%r8,%r14,4)
leal 0x5(%r12), %esi
movq -0x30(%rbp), %rdi
callq 0x25f31
movq -0x48(%rbp), %rcx
movl $0x1, %r15d
testl %eax, %eax
jne 0x2639e
decl 0x10(%rcx,%r14,4)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %r8
movl 0x4(%r8,%r14,4), %esi
testl %esi, %esi
je 0x26398
cmpl $0x7, (%r8,%r14,4)
jne 0x26389
subl %esi, %r12d
movl %r12d, %esi
jmp 0x2638c
addl %r12d, %esi
movq -0x30(%rbp), %rdi
testl %esi, %esi
jne 0x25f52
movl $0xe, %r15d
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal (%rbx,%r12), %eax
testl %ebx, %ebx
cmovel %ebx, %eax
movl %eax, -0x60(%rbp)
cltq
xorl %r13d, %r13d
cmpl $0x8, (%r8,%rax,4)
jne 0x263cd
movl 0x8(%r8,%rax,4), %r13d
movslq 0xc(%r8,%r14,4), %rax
movq %rax, -0x38(%rbp)
movl 0x14(%r8,%r14,4), %eax
addl $-0x3, %eax
cmpl $0x5, %eax
movq %r10, -0x58(%rbp)
ja 0x266dc
movl 0x8(%r8,%r14,4), %r14d
addl $0x7, %r12d
leaq 0x1315(%rip), %rcx      # 0x27710
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r12d, %r12d
testb %dl, %dl
sete %al
testb $0x1, %r9b
je 0x2641f
testb %dl, %dl
sete %cl
cmpb $0xa, %dl
sete %al
orb %cl, %al
testb %al, %al
jne 0x265c2
cmpl %r14d, %r12d
jge 0x265c2
movb 0x1(%rdi,%r12), %dl
incq %r12
jmp 0x26407
leal -0x3ea(%r10), %eax
movl $0xe, %r15d
cmpl $0x44a, %eax            # imm = 0x44A
ja 0x2639e
movq %rdi, %r15
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movl -0x58(%rbp), %esi
callq 0x25f31
testl %eax, %eax
je 0x266ef
movq 0x20(%rbx), %rax
movslq (%rax,%r14,4), %rax
movl 0x60(%rbx), %ecx
cmpq $0x7d0, %rax            # imm = 0x7D0
movq %r15, %rsi
jg 0x266fb
leal -0x3e9(%rax), %edx
cmpl %ecx, %edx
jge 0x26834
movq 0x58(%rbx), %rcx
cmpl $-0x1, -0x1f48(%rcx,%rax,8)
jne 0x26834
subl 0x40(%rbx), %esi
movl %esi, -0x1f48(%rcx,%rax,8)
jmp 0x26834
movq -0x30(%rbp), %rbx
xorl %r15d, %r15d
movq %rdi, %r14
leal 0x2(%r12), %esi
movq %rbx, %rdi
callq 0x25f31
testl %eax, %eax
jne 0x26834
movq %r14, 0x48(%rbx)
movq 0x20(%rbx), %rax
movslq %r12d, %rdx
movl 0x4(%rax,%rdx,4), %ecx
testl %ecx, %ecx
je 0x2639e
movl %ecx, %esi
negl %esi
cmpl $0x7, (%rax,%rdx,4)
cmovnel %ecx, %esi
addl %esi, %r12d
je 0x2639e
movq %r14, %rdi
movslq %r12d, %rcx
cmpl $0x6, (%rax,%rcx,4)
je 0x264bc
jmp 0x2639e
testl %r14d, %r14d
jle 0x266d4
movslq %r12d, %r11
leaq (%rdi,%r14), %rax
movq %rax, -0x68(%rbp)
leaq (%r8,%r11,4), %rbx
addq $0x8, %rbx
xorl %r12d, %r12d
movq %rdi, %rax
movq %rbx, -0x70(%rbp)
movq %rax, -0x40(%rbp)
movzbl (%rax), %eax
testb $0x2, %r9b
je 0x26566
movq %rdi, %r15
movl %eax, %edi
movq %r11, %rbx
callq 0x60e0
movq %rbx, %r11
movq -0x70(%rbp), %rbx
movq -0x58(%rbp), %r10
movl -0x50(%rbp), %r9d
movq -0x48(%rbp), %r8
movq %r15, %rdi
testb $0x1, %r9b
jne 0x26575
testl %eax, %eax
jne 0x26586
jmp 0x266c6
testl %eax, %eax
je 0x266c6
cmpl $0xa, %eax
je 0x266c6
movl (%r8,%r11,4), %edx
movq %rbx, %rcx
testl %edx, %edx
je 0x265aa
movl -0x4(%rcx), %esi
cmpl %eax, %esi
jg 0x265a2
addl %edx, %esi
cmpl %eax, %esi
jg 0x266c6
movl (%rcx), %edx
addq $0x8, %rcx
jmp 0x2658d
incl %r12d
movq -0x40(%rbp), %rax
incq %rax
cmpl %r14d, %r12d
jne 0x26536
jmp 0x26674
leaq (%rdi,%r12), %rcx
jmp 0x2672b
testl %r14d, %r14d
jle 0x266d4
movslq %r12d, %rbx
leaq (%rdi,%r14), %rax
movq %rax, -0x68(%rbp)
leaq (%r8,%rbx,4), %r11
addq $0x8, %r11
xorl %r12d, %r12d
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movzbl (%rax), %eax
testb $0x2, %r9b
je 0x26621
movq %rdi, %r15
movl %eax, %edi
movq %rbx, -0x70(%rbp)
movq %r11, %rbx
callq 0x60e0
movq %rbx, %r11
movq -0x70(%rbp), %rbx
movq -0x58(%rbp), %r10
movl -0x50(%rbp), %r9d
movq -0x48(%rbp), %r8
movq %r15, %rdi
testb $0x1, %r9b
jne 0x26630
testl %eax, %eax
jne 0x26641
jmp 0x266c6
testl %eax, %eax
je 0x266c6
cmpl $0xa, %eax
je 0x266c6
movl (%r8,%rbx,4), %edx
movq %r11, %rcx
testl %edx, %edx
je 0x266c6
movl -0x4(%rcx), %esi
cmpl %eax, %esi
jg 0x26659
addl %edx, %esi
cmpl %eax, %esi
jg 0x26661
movl (%rcx), %edx
addq $0x8, %rcx
jmp 0x26648
incl %r12d
movq -0x40(%rbp), %rax
incq %rax
cmpl %r14d, %r12d
jne 0x265ed
movq -0x68(%rbp), %rcx
movl %r14d, %r12d
jmp 0x2672b
testl %r14d, %r14d
jle 0x266d4
movslq %r12d, %rax
movl (%r8,%rax,4), %ebx
leaq (%rdi,%r14), %rax
movq %rax, -0x40(%rbp)
xorl %r12d, %r12d
movzbl (%rdi,%r12), %eax
testb $0x2, %r9b
je 0x266b7
movq %rdi, %r15
movl %eax, %edi
callq 0x60e0
movq -0x58(%rbp), %r10
movl -0x50(%rbp), %r9d
movq %r15, %rdi
cmpl %eax, %ebx
jne 0x26725
incq %r12
cmpl %r12d, %r14d
jne 0x26697
movl %r14d, %r12d
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %r14
movq -0x40(%rbp), %rcx
jmp 0x26733
xorl %r12d, %r12d
movq %rdi, %rcx
jmp 0x2672b
movq -0x30(%rbp), %rax
movl $0xe, 0x8(%rax)
xorl %r12d, %r12d
movq %rdi, %rcx
jmp 0x2672f
movq %r15, 0x48(%rbx)
xorl %r15d, %r15d
jmp 0x2639e
addl $0xfffff82f, %eax       # imm = 0xFFFFF82F
cmpl %ecx, %eax
jge 0x26834
movq 0x58(%rbx), %rcx
movl %eax, %eax
cmpl $-0x1, 0x4(%rcx,%rax,8)
jne 0x26834
subl 0x40(%rbx), %esi
movl %esi, 0x4(%rcx,%rax,8)
jmp 0x26834
movq %r12, %rcx
addq %rdi, %rcx
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %r14
movq %rcx, 0x48(%rax)
xorl %r15d, %r15d
cmpl %r14d, %r12d
jl 0x2639e
xorl %eax, %eax
cmpl $0xb, %r10d
sete %al
movl %r12d, %ecx
movq %rcx, -0x48(%rbp)
movl %r14d, %ecx
cmovnel %r12d, %ecx
leaq -0x1(,%rax,2), %rax
movq %rax, -0x50(%rbp)
movslq %ecx, %r12
cmpl $0xb, %r10d
jne 0x2677a
cmpq -0x48(%rbp), %r12
jle 0x26783
jmp 0x2639e
cmpq %r14, %r12
jl 0x2639e
leaq (%rdi,%r12), %rax
movq -0x30(%rbp), %rcx
movq %rax, 0x48(%rcx)
movl 0x4(%rcx), %ebx
movzbl (%rdi,%r12), %eax
testb $0x2, %bl
je 0x267b3
movl %r13d, %r14d
movq %rdi, %r13
movl %eax, %edi
callq 0x60e0
movq %r13, %rdi
movl %r14d, %r13d
movq -0x38(%rbp), %r14
cmpl $0xa, %r13d
sete %cl
testl %r13d, %r13d
je 0x267c8
andb %cl, %bl
jne 0x267c8
cmpl %r13d, %eax
jne 0x267de
movq %rdi, %rbx
movq -0x30(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x25f31
movq %rbx, %rdi
testl %eax, %eax
jne 0x26834
addq -0x50(%rbp), %r12
movq -0x58(%rbp), %r10
jmp 0x26769
incl %eax
movl %eax, 0x10(%r8,%r14,4)
addl $0x5, %r12d
movq -0x30(%rbp), %rdi
movl %r12d, %esi
callq 0x25f31
movq -0x48(%rbp), %rcx
movl $0x1, %r15d
testl %eax, %eax
jne 0x2639e
decl 0x10(%rcx,%r14,4)
jmp 0x266f3
leal (%rbx,%r12), %esi
testl %ebx, %ebx
cmovel %ebx, %esi
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x25f31
testl %eax, %eax
je 0x2683f
movl $0x1, %r15d
jmp 0x2639e
movq %r14, %r15
movq -0x48(%rbp), %r14
incl 0x10(%r14,%r15,4)
addl $0x5, %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x25f31
movq %r15, %rdx
movl $0x1, %r15d
testl %eax, %eax
jne 0x2639e
decl 0x10(%r14,%rdx,4)
jmp 0x266f3