// File: /workspace/github_c_makefile_star2_O0/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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x34f9f
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x162c0
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movl 0x4(%rax), %edx
andl $0x2, %edx
leaq -0x30(%rbp), %rsi
callq 0x344c0
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x48(%rbp)
testl %eax, %eax
je 0x34e35
jmp 0x34944
movl -0x48(%rbp), %eax
subl $0x1, %eax
je 0x34a58
jmp 0x34952
movl -0x48(%rbp), %eax
subl $0x2, %eax
je 0x34a92
jmp 0x34960
movl -0x48(%rbp), %eax
subl $0x3, %eax
je 0x34bc7
jmp 0x3496e
movl -0x48(%rbp), %eax
subl $0x4, %eax
je 0x34c7e
jmp 0x3497c
movl -0x48(%rbp), %eax
subl $0x5, %eax
je 0x34cd9
jmp 0x3498a
movl -0x48(%rbp), %eax
subl $0x6, %eax
je 0x34d3e
jmp 0x34998
movl -0x48(%rbp), %eax
subl $0x7, %eax
je 0x34d39
jmp 0x349a6
movl -0x48(%rbp), %eax
subl $0x8, %eax
je 0x34bfe
jmp 0x349b4
movl -0x48(%rbp), %eax
subl $0x9, %eax
je 0x34d34
jmp 0x349c2
movl -0x48(%rbp), %eax
addl $-0xa, %eax
subl $0x2, %eax
jb 0x34ddd
jmp 0x349d3
movl -0x48(%rbp), %eax
addl $-0xc, %eax
subl $0x2, %eax
jb 0x34e09
jmp 0x349e4
movl -0x48(%rbp), %eax
subl $0xe, %eax
je 0x34a3b
jmp 0x349ee
movl -0x48(%rbp), %eax
subl $0xf, %eax
je 0x34a7b
jmp 0x349fc
movl -0x48(%rbp), %eax
subl $0x10, %eax
je 0x34ab4
jmp 0x34a0a
movl -0x48(%rbp), %eax
subl $0x11, %eax
je 0x34b3a
jmp 0x34a18
movl -0x48(%rbp), %eax
subl $0x3e8, %eax            # imm = 0x3E8
je 0x34e41
jmp 0x34a28
movl -0x48(%rbp), %eax
subl $0x7d0, %eax            # imm = 0x7D0
je 0x34e41
jmp 0x34e55
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x34a56
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
jmp 0x34a58
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x50(%rcx), %rax
je 0x34a76
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
jmp 0x34f94
cmpl $0x0, -0x30(%rbp)
je 0x34a8d
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
jmp 0x34f94
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x34fb0
cmpl $0x0, %eax
jne 0x34aaf
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
jmp 0x34f94
callq 0x64f0
movq (%rax), %rax
movl -0x30(%rbp), %ecx
movzbl %cl, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x34ae3
cmpl $0x5f, -0x30(%rbp)
je 0x34ae3
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jbe 0x34b35
callq 0x64f0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rcx
movzbl -0x1(%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x34b29
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movsbl -0x1(%rax), %eax
cmpl $0x5f, %eax
jne 0x34b35
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
jmp 0x34f94
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jbe 0x34bbb
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x34fb0
cmpl $0x0, %eax
jne 0x34b80
callq 0x64f0
movq (%rax), %rax
movl -0x30(%rbp), %ecx
movzbl %cl, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x34bb9
cmpl $0x5f, -0x30(%rbp)
je 0x34bb9
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movsbl -0x1(%rax), %eax
movl %eax, -0x30(%rbp)
callq 0x64f0
movq (%rax), %rax
movl -0x30(%rbp), %ecx
movzbl %cl, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x34bb2
cmpl $0x5f, -0x30(%rbp)
jne 0x34bb7
jmp 0x34f94
jmp 0x34bb9
jmp 0x34bbb
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x34fb0
cmpl $0x0, %eax
je 0x34be4
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x48(%rax)
jmp 0x34f94
movl -0x18(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
callq 0x16320
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movl -0x38(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x2, %ecx
callq 0x16470
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jge 0x34c64
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
movl -0x3c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x48(%rax)
jmp 0x34f94
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x34fb0
cmpl $0x0, %eax
jne 0x34cb3
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x18(%rbp), %eax
addl $0x2, %eax
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x30(%rbp), %esi
callq 0x35000
cmpl $0x0, %eax
jne 0x34cbf
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x48(%rax)
jmp 0x34f94
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x34fb0
cmpl $0x0, %eax
jne 0x34d0e
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x18(%rbp), %eax
addl $0x2, %eax
cltq
shlq $0x2, %rax
addq %rax, %rdi
movl -0x30(%rbp), %esi
callq 0x35000
cmpl $0x0, %eax
je 0x34d1a
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
movl -0x2c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x48(%rax)
jmp 0x34f94
jmp 0x34f94
jmp 0x34f94
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
cmpl $0x6, (%rax,%rcx,4)
je 0x34d5b
movl -0x18(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x1c(%rbp)
jmp 0x34dd8
jmp 0x34d5d
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
addl $0x2, %esi
callq 0x348e0
cmpl $0x0, %eax
je 0x34d89
movl $0x1, -0x4(%rbp)
jmp 0x34fa6
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x162c0
movl %eax, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x18(%rbp)
movb %al, -0x49(%rbp)
je 0x34dc5
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x6, (%rax,%rcx,4)
sete %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x34d5d
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
jmp 0x34f94
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0xb, (%rax,%rcx,4)
sete %al
andb $0x1, %al
movzbl %al, %edx
callq 0x35060
movl %eax, -0x4(%rbp)
jmp 0x34fa6
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0xd, (%rax,%rcx,4)
sete %al
andb $0x1, %al
movzbl %al, %edx
callq 0x351e0
movl %eax, -0x4(%rbp)
jmp 0x34fa6
movl $0x1, -0x4(%rbp)
jmp 0x34fa6
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x348e0
movl %eax, -0x4(%rbp)
jmp 0x34fa6
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x3ea, (%rax,%rcx,4)   # imm = 0x3EA
jl 0x34f8b
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x835, (%rax,%rcx,4)   # imm = 0x835
jge 0x34f8b
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x348e0
cmpl $0x0, %eax
je 0x34f76
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x7d1, (%rax,%rcx,4)   # imm = 0x7D1
jge 0x34f14
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x3e9, %eax            # imm = 0x3E9
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jge 0x34f12
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x40(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,8)
jne 0x34f12
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
subq %rcx, %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x40(%rbp), %rcx
movl %edx, (%rax,%rcx,8)
jmp 0x34f6d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $0x7d1, %eax            # imm = 0x7D1
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jge 0x34f6b
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x44(%rbp), %rcx
cmpl $-0x1, 0x4(%rax,%rcx,8)
jne 0x34f6b
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
subq %rcx, %rax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movslq -0x44(%rbp), %rcx
movl %edx, 0x4(%rax,%rcx,8)
jmp 0x34f6d
movl $0x1, -0x4(%rbp)
jmp 0x34fa6
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x34fa6
movl $0xe, -0x4(%rbp)
jmp 0x34fa6
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x348f5
movl $0xe, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop