// File: /workspace/github_c_makefile_star2_O2/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
movl %esi, %r13d
movq %rdi, %r15
movq %rdi, -0x38(%rbp)
testl %r13d, %r13d
je 0x21e50
movq %r15, %rdi
movl %r13d, %esi
callq 0x117c2
movl %eax, -0x2c(%rbp)
movq 0x48(%r15), %rdi
movl 0x4(%r15), %r12d
movl %r12d, %r14d
andl $0x2, %r12d
movq %rdi, -0x40(%rbp)
leaq -0x44(%rbp), %rsi
movl %r12d, %edx
callq 0x2194d
movq 0x20(%r15), %r15
movslq %r13d, %rbx
movl (%r15,%rbx,4), %edx
cmpq $0x11, %rdx
ja 0x21e58
leaq (%r15,%rbx,4), %rbx
leaq 0x1ab2(%rip), %rcx      # 0x23668
movslq (%rcx,%rdx,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %r15
jmp 0x21df2
movq -0x38(%rbp), %rax
testb $0x10, 0x38(%rax)
jne 0x222b7
movq -0x38(%rbp), %r15
movq -0x40(%rbp), %rax
cmpq 0x50(%r15), %rax
jmp 0x21d48
xorl %r12d, %r12d
movq -0x38(%rbp), %r15
movq -0x40(%rbp), %r13
cmpq 0x50(%r15), %r13
jbe 0x222de
movl -0x44(%rbp), %ebx
testb $0x1, %r14b
jne 0x21dfe
testq %rbx, %rbx
movl -0x2c(%rbp), %r14d
jne 0x21e13
jmp 0x21e0c
movl -0x44(%rbp), %esi
testb $0x1, %r14b
jne 0x21d57
testl %esi, %esi
movq -0x38(%rbp), %r15
movl -0x2c(%rbp), %r14d
jne 0x21d73
jmp 0x222b7
movl -0x44(%rbp), %eax
testb $0x1, %r14b
jne 0x21d88
testl %eax, %eax
movq -0x38(%rbp), %r15
movl -0x2c(%rbp), %r14d
jne 0x21dd5
jmp 0x222b7
movl -0x44(%rbp), %esi
testb $0x1, %r14b
jne 0x21da5
testl %esi, %esi
movq -0x38(%rbp), %r15
movl -0x2c(%rbp), %r14d
jne 0x21dc1
jmp 0x222b7
movl -0x44(%rbp), %eax
testb $0x1, %r14b
jne 0x21de2
testl %eax, %eax
jmp 0x21d44
movslq -0x2c(%rbp), %rax
cmpl $0x6, (%r15,%rax,4)
je 0x22012
addl $0x2, %r13d
movl %r13d, %r14d
movq -0x38(%rbp), %r15
jmp 0x21df6
callq 0x64e0
movq (%rax), %rax
movl -0x44(%rbp), %ecx
xorl %r12d, %r12d
cmpl $0x5f, %ecx
je 0x21cd7
movzbl %cl, %ecx
movzwl (%rax,%rcx,2), %ecx
andl $0x8, %ecx
je 0x222de
movq -0x38(%rbp), %r15
movq -0x40(%rbp), %rcx
cmpq 0x50(%r15), %rcx
jbe 0x21df2
movzbl -0x1(%rcx), %ecx
cmpl $0x5f, %ecx
movl -0x2c(%rbp), %r14d
je 0x222de
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
je 0x21df6
jmp 0x222de
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x117e9
movq %rbx, %rdi
movl %eax, %esi
movq -0x40(%rbp), %rdx
movl %r12d, %ecx
callq 0x1185d
testl %eax, %eax
js 0x222b7
movl %eax, %eax
movq -0x38(%rbp), %r15
addq %rax, 0x48(%r15)
jmp 0x21df2
cmpl $0x0, -0x44(%rbp)
movq -0x38(%rbp), %r15
movl -0x2c(%rbp), %r14d
je 0x21df6
jmp 0x222b7
xorl %r12d, %r12d
testl %esi, %esi
movq -0x38(%rbp), %r15
je 0x222de
cmpl $0xa, %esi
movl -0x2c(%rbp), %r14d
je 0x222de
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x222f0
testl %eax, %eax
je 0x21dd5
jmp 0x222b7
xorl %r12d, %r12d
testl %eax, %eax
movq -0x38(%rbp), %r15
je 0x222de
cmpl $0xa, %eax
movl -0x2c(%rbp), %r14d
jne 0x21dd5
jmp 0x222de
xorl %r12d, %r12d
testl %esi, %esi
movq -0x38(%rbp), %r15
je 0x222de
cmpl $0xa, %esi
movl -0x2c(%rbp), %r14d
je 0x222de
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x222f0
testl %eax, %eax
je 0x222b7
movq -0x40(%rbp), %rax
incq %rax
movq %rax, 0x48(%r15)
jmp 0x21df6
testl %eax, %eax
movq -0x38(%rbp), %r15
je 0x21df2
cmpl $0xa, %eax
jmp 0x21d48
movl -0x2c(%rbp), %r14d
movl %r14d, %r13d
jmp 0x21b60
testq %rbx, %rbx
movl -0x2c(%rbp), %r14d
je 0x21e0c
cmpl $0xa, %ebx
jne 0x21e13
callq 0x64e0
jmp 0x21e35
callq 0x64e0
cmpq $0x5f, %rbx
je 0x222de
movq (%rax), %rcx
movzbl %bl, %edx
movzwl (%rcx,%rdx,2), %ecx
andl $0x8, %ecx
jne 0x222de
movzbl -0x1(%r13), %ecx
cmpl $0x5f, %ecx
je 0x21df6
movq (%rax), %rax
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
jne 0x21df6
jmp 0x222de
pushq $0xe
popq %rax
jmp 0x222e1
cmpl $0x3e8, %edx            # imm = 0x3E8
je 0x21e6c
cmpl $0x7d0, %edx            # imm = 0x7D0
jne 0x21f9e
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x21b45
movl %eax, %r12d
jmp 0x222de
movl 0x10(%rbx), %eax
cmpl 0xc(%rbx), %eax
jge 0x21f57
incl %eax
movl %eax, 0x10(%rbx)
addl $0x5, %r13d
movq -0x38(%rbp), %rdi
movl %r13d, %esi
callq 0x21b45
pushq $0x1
popq %r12
testl %eax, %eax
jne 0x222de
decl 0x10(%rbx)
jmp 0x222b7
movq %rdx, -0x68(%rbp)
movl 0x8(%rbx), %eax
movq %rax, -0x58(%rbp)
movslq 0xc(%rbx), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movl %r13d, %esi
callq 0x117c2
movl %eax, -0x6c(%rbp)
cltq
movl $0x0, -0x2c(%rbp)
cmpl $0x8, (%r15,%rax,4)
jne 0x21eef
movl 0x8(%r15,%rax,4), %eax
movl %eax, -0x2c(%rbp)
movl 0x14(%rbx), %eax
addl $-0x3, %eax
cmpl $0x5, %eax
ja 0x2219c
addl $0x7, %r13d
leaq 0x17a7(%rip), %rcx      # 0x236b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %r13d, %r13d
movq -0x38(%rbp), %r8
movq -0x68(%rbp), %rsi
movq -0x58(%rbp), %rdi
movq -0x40(%rbp), %rax
movb (%rax,%r13), %cl
testb %cl, %cl
sete %al
testb $0x1, %r14b
je 0x21f41
testb %cl, %cl
sete %dl
cmpb $0xa, %cl
sete %al
orb %dl, %al
testb %al, %al
jne 0x220d6
cmpl %edi, %r13d
jge 0x220d6
incq %r13
jmp 0x21f21
movl 0x8(%rbx), %ecx
xorl %r12d, %r12d
cmpl %ecx, %eax
movq -0x38(%rbp), %r14
jg 0x222de
cmpl $0xd, %edx
jne 0x221b1
movq %r14, %rdi
movl %r13d, %esi
callq 0x117c2
movq %r14, %rdi
movl %eax, %esi
callq 0x21b45
testl %eax, %eax
jne 0x222da
incl 0x10(%rbx)
addl $0x5, %r13d
movq %r14, %rdi
jmp 0x21e99
leal -0x3ea(%rdx), %eax
cmpl $0x44a, %eax            # imm = 0x44A
movq -0x38(%rbp), %r15
ja 0x2205d
movq %r15, %rdi
movl -0x2c(%rbp), %esi
callq 0x21b45
testl %eax, %eax
je 0x222af
movq 0x20(%r15), %rax
movslq (%rax,%rbx,4), %rax
movl 0x60(%r15), %ecx
cmpq $0x7d0, %rax            # imm = 0x7D0
movq -0x40(%rbp), %rsi
jg 0x222bc
leal -0x3e9(%rax), %edx
cmpl %ecx, %edx
jge 0x222da
movq 0x58(%r15), %rcx
cmpl $-0x1, -0x1f48(%rcx,%rax,8)
jne 0x222da
subl 0x40(%r15), %esi
movl %esi, -0x1f48(%rcx,%rax,8)
jmp 0x222da
movq -0x38(%rbp), %rbx
xorl %r12d, %r12d
leal 0x2(%r13), %esi
movq %rbx, %rdi
callq 0x21b45
testl %eax, %eax
jne 0x222da
movq -0x40(%rbp), %rax
movq %rax, 0x48(%rbx)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x117c2
testl %eax, %eax
je 0x222de
movl %eax, %r13d
movq 0x20(%rbx), %rax
movslq %r13d, %rcx
cmpl $0x6, (%rax,%rcx,4)
je 0x22019
jmp 0x222de
pushq $0xe
jmp 0x222dc
movslq %r13d, %rax
leaq (%r15,%rax,4), %rax
movq %rax, -0x50(%rbp)
xorl %r13d, %r13d
movq -0x58(%rbp), %r15
testl %r15d, %r15d
cmovlel %r13d, %r15d
movq -0x40(%rbp), %rax
leaq (%rax,%r13), %rbx
cmpl %r13d, %r15d
je 0x221ea
movq %rbx, %rdi
leaq -0x48(%rbp), %rsi
movl %r12d, %edx
callq 0x2194d
movl -0x48(%rbp), %esi
testb $0x1, %r14b
jne 0x220af
testl %esi, %esi
jne 0x220c0
jmp 0x221ed
testl %esi, %esi
je 0x221ed
cmpl $0xa, %esi
je 0x221ed
movq -0x50(%rbp), %rdi
callq 0x222f0
testl %eax, %eax
jne 0x221ed
incq %r13
jmp 0x2207d
movq -0x40(%rbp), %rax
leaq (%rax,%r13), %rbx
jmp 0x22206
movslq %r13d, %rax
leaq (%r15,%rax,4), %rax
movq %rax, -0x50(%rbp)
xorl %r13d, %r13d
movq -0x58(%rbp), %r15
testl %r15d, %r15d
cmovlel %r13d, %r15d
movq -0x40(%rbp), %rax
leaq (%rax,%r13), %rbx
cmpl %r13d, %r15d
je 0x221ea
movq %rbx, %rdi
leaq -0x48(%rbp), %rsi
movl %r12d, %edx
callq 0x2194d
movl -0x48(%rbp), %esi
testb $0x1, %r14b
jne 0x2212e
testl %esi, %esi
jne 0x2213f
jmp 0x221ed
testl %esi, %esi
je 0x221ed
cmpl $0xa, %esi
je 0x221ed
movq -0x50(%rbp), %rdi
callq 0x222f0
testl %eax, %eax
je 0x221ed
incq %r13
jmp 0x220fc
movslq %r13d, %rax
movq %rax, -0x50(%rbp)
xorl %r14d, %r14d
movq -0x58(%rbp), %r13
testl %r13d, %r13d
cmovlel %r14d, %r13d
movq -0x40(%rbp), %rax
leaq (%rax,%r14), %rbx
cmpl %r14d, %r13d
je 0x221fe
movq %rbx, %rdi
leaq -0x48(%rbp), %rsi
movl %r12d, %edx
callq 0x2194d
movq -0x50(%rbp), %rax
movl (%r15,%rax,4), %eax
cmpl -0x48(%rbp), %eax
jne 0x221fb
incq %r14
jmp 0x2216a
movq -0x38(%rbp), %r8
movl $0xe, 0x8(%r8)
xorl %r13d, %r13d
movq -0x40(%rbp), %rbx
jmp 0x22202
cmpl %ecx, %eax
jge 0x221d5
incl %eax
movl %eax, 0x10(%rbx)
leal 0x5(%r13), %esi
movq %r14, %rdi
callq 0x21b45
pushq $0x1
popq %r12
testl %eax, %eax
jne 0x222de
decl 0x10(%rbx)
movq %r14, %rdi
movl %r13d, %esi
callq 0x117c2
movq %r14, %rdi
movl %eax, %esi
jmp 0x21e73
movl %r15d, %r13d
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rcx
movq -0x38(%rbp), %r8
jmp 0x2220a
movl %r14d, %r13d
movq -0x38(%rbp), %r8
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rcx
movq %rbx, 0x48(%r8)
xorl %r12d, %r12d
cmpl %ecx, %r13d
jl 0x222de
xorl %eax, %eax
cmpl $0xb, %esi
sete %al
movslq %r13d, %rdx
movq %rdx, -0x58(%rbp)
cmovnel %r13d, %ecx
leaq -0x1(,%rax,2), %rax
movq %rax, -0x50(%rbp)
movslq %ecx, %r13
movl -0x2c(%rbp), %r15d
cmpl $0xb, %esi
jne 0x22250
cmpq -0x58(%rbp), %r13
jle 0x2225a
jmp 0x222de
cmpq -0x60(%rbp), %r13
jl 0x222de
cmpl $0xa, %r15d
sete %r14b
movq -0x40(%rbp), %rax
leaq (%rax,%r13), %rdi
movq -0x38(%rbp), %rax
movq %rdi, 0x48(%rax)
movl 0x4(%rax), %ebx
movl %ebx, %edx
andl $0x2, %edx
leaq -0x70(%rbp), %rsi
callq 0x2194d
testl %r15d, %r15d
je 0x22295
andb %r14b, %bl
jne 0x22295
movl -0x2c(%rbp), %eax
cmpl %eax, -0x70(%rbp)
jne 0x222a5
movq -0x38(%rbp), %rdi
movl -0x6c(%rbp), %esi
callq 0x21b45
testl %eax, %eax
jne 0x222da
addq -0x50(%rbp), %r13
movq -0x68(%rbp), %rsi
jmp 0x22240
movq -0x40(%rbp), %rax
movq %rax, 0x48(%r15)
xorl %r12d, %r12d
jmp 0x222de
addl $0xfffff82f, %eax       # imm = 0xFFFFF82F
cmpl %ecx, %eax
jge 0x222da
movq 0x58(%r15), %rcx
movl %eax, %eax
cmpl $-0x1, 0x4(%rcx,%rax,8)
jne 0x222da
subl 0x40(%r15), %esi
movl %esi, 0x4(%rcx,%rax,8)
pushq $0x1
popq %r12
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq