// File: /workspace/github_c_makefile_star2_O1/phase[P]o/libregexp/regcomp.c
// Function: regcomp1
static	Reprog*
regcomp1(char *s, int literal, int dot_type)
{
	int token;
	Reprog *volatile pp;

	/* get memory for the program */
	pp = malloc(sizeof(Reprog) + 6*sizeof(Reinst)*strlen(s));
	if(pp == 0){
		regerror("out of memory");
		return 0;
	}
	freep = pp->firstinst;
	classp = pp->class;
	errors = 0;

	if(setjmp(regkaboom))
		goto out;

	/* go compile the sucker */
	lexdone = 0;
	exprp = s;
	nclass = 0;
	nbra = 0;
	atorp = atorstack;
	andp = andstack;
	subidp = subidstack;
	lastwasand = FALSE;
	cursubid = 0;

	/* Start with a low priority operator to prime parser */
	pushator(START-1);
	while((token = lex(literal, dot_type)) != END){
		if((token&0300) == OPERATOR)
			operator(token);
		else
			operand(token);
	}

	/* Close with a low priority operator */
	evaluntil(START);

	/* Force END */
	operand(END);
	evaluntil(START);
#ifdef DEBUG
	dumpstack();
#endif
	if(nbra)
		rcerror("unmatched left paren");
	--andp;	/* points to first and only operand */
	pp->startinst = andp->first;
#ifdef DEBUG
	dump(pp);
#endif
	pp = optimize(pp);
#ifdef DEBUG
	printf("start: %d\n", (int)(andp->first-pp->firstinst));
	dump(pp);
#endif
out:
	if(errors){
		free(pp);
		pp = 0;
	}
	return pp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x20e0
leaq (%rax,%rax,8), %rax
shlq $0x4, %rax
movq %rax, %rdi
addq $0x1100, %rdi           # imm = 0x1100
callq 0x21c0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x7915
movl $0x1088, %eax           # imm = 0x1088
addq -0x38(%rbp), %rax
movq %rax, 0x6bdf(%rip)      # 0xe0a0
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, 0x6bd8(%rip)      # 0xe0a8
movl $0x0, 0x6bd6(%rip)      # 0xe0b0
leaq 0x6bdf(%rip), %rdi      # 0xe0c0
callq 0x2160
testl %eax, %eax
jne 0x7a58
movl %ebx, -0x40(%rbp)
xorl %edx, %edx
movb %dl, 0x6c8f(%rip)       # 0xe188
movq %r15, 0x6c90(%rip)      # 0xe190
movl %edx, 0x6c92(%rip)      # 0xe198
movl %edx, 0x6c90(%rip)      # 0xe19c
leaq 0x6c8d(%rip), %rcx      # 0xe1a0
movq %rcx, 0x6cd6(%rip)      # 0xe1f0
leaq 0x6cdf(%rip), %rcx      # 0xe200
movq %rcx, 0x6e18(%rip)      # 0xe340
leaq 0x6e21(%rip), %rcx      # 0xe350
movq %rcx, 0x6e6a(%rip)      # 0xe3a0
movb %dl, 0x6e6c(%rip)       # 0xe3a8
movl %edx, 0x6e6a(%rip)      # 0xe3ac
movl $0x7f, %edi
callq 0x7b1b
leaq 0x6e5d(%rip), %r15      # 0xe3b0
leaq -0x2c(%rbp), %r13
movq %r15, %rdi
callq 0x7f85
movl 0x6e4b(%rip), %ecx      # 0xe3b0
orl %r14d, %eax
je 0x7613
xorl %r12d, %r12d
testl %ecx, %ecx
sete %cl
movb %cl, %r12b
shll $0x7, %r12d
orl $0x7f, %r12d
cmpl $0xff, %r12d
je 0x7928
movl %r12d, %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x7645
cmpl $0x81, %r12d
jne 0x75c2
movl 0x6bec(%rip), %eax      # 0xe19c
movl %eax, %ecx
decl %ecx
movl %ecx, 0x6be2(%rip)      # 0xe19c
testl %eax, %eax
jle 0x7ac9
cmpl $0x82, %r12d
jne 0x7652
movl 0x6dd7(%rip), %eax      # 0xe3ac
movl %eax, %ecx
incl %ecx
movl %ecx, 0x6dcd(%rip)      # 0xe3ac
cmpl $0x1f, %eax
jge 0x7aba
incl 0x6bae(%rip)            # 0xe19c
cmpb $0x1, 0x6db3(%rip)      # 0xe3a8
jne 0x765a
movl $0x84, %ebx
movl %ebx, %edi
callq 0x7c16
movl %ebx, %edi
callq 0x7b1b
movb $0x0, 0x6d97(%rip)      # 0xe3a8
jmp 0x765a
cmpl $0x3e, %ecx
jg 0x769d
movl %ecx, %eax
addl $-0x24, %eax
cmpl $0xa, %eax
ja 0x774c
leaq 0x1e37(%rip), %rcx      # 0x9468
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xc4, %r12d
jmp 0x7581
movl %r12d, %edi
callq 0x7b6a
jmp 0x7557
movl %r12d, %edi
callq 0x7c16
cmpl $0x81, %r12d
je 0x766b
movl %r12d, %edi
callq 0x7b1b
cmpl $0x81, %r12d
sete %al
movl %r12d, %ecx
andl $-0x43, %ecx
cmpl $0x85, %ecx
sete %cl
cmpl $0x86, %r12d
sete %dl
orb %al, %dl
orb %cl, %dl
movb %dl, 0x6d10(%rip)       # 0xe3a8
jmp 0x7557
cmpl $0x5d, %ecx
jg 0x7737
cmpl $0x3f, %ecx
je 0x779a
cmpl $0x5b, %ecx
jne 0x775a
movl 0x6ada(%rip), %eax      # 0xe198
cmpq $0x10, %rax
jae 0x7ad8
movl %eax, %ecx
incl %ecx
movl %ecx, 0x6ac6(%rip)      # 0xe198
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %rax
addq 0x69c4(%rip), %rax      # 0xe0a8
movq %rax, 0x6ccd(%rip)      # 0xe3b8
movq %r13, %rdi
callq 0x7f85
movl %eax, %ecx
movl $0xc5, %esi
xorl %edx, %edx
testl %eax, %eax
jne 0x77b0
cmpl $0x5e, -0x2c(%rbp)
movl %esi, %eax
jne 0x77b2
movq %r13, %rdi
callq 0x7f85
movl %eax, %ecx
movabsq $0xa0000000a, %rax      # imm = 0xA0000000A
movq %rax, -0x140(%rbp)
movl $0x8, %edx
movl $0xc6, %eax
jmp 0x77b2
cmpl $0x5e, %ecx
je 0x77a5
cmpl $0x7c, %ecx
jne 0x775a
movl $0x83, %r12d
jmp 0x7581
movl $0xff, %r12d
testl %ecx, %ecx
je 0x7581
movl $0x7f, %r12d
jmp 0x7581
movl $0x86, %r12d
jmp 0x7581
movl $0x85, %r12d
jmp 0x7581
movl $0x82, %r12d
jmp 0x7581
movl $0x81, %r12d
jmp 0x7581
movl -0x40(%rbp), %r12d
jmp 0x7581
movl $0x87, %r12d
jmp 0x7581
movl $0xc3, %r12d
jmp 0x7581
movl %esi, %eax
movq %rdx, %rbx
movl %eax, -0x3c(%rbp)
movb $0x1, %dl
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x7a88
leaq (%rbx,%rbp), %r12
addq $-0x140, %r12           # imm = 0xFEC0
movl %eax, %esi
xorl $0x5d, %esi
orl %ecx, %esi
je 0x783f
movl %eax, %edx
xorl $0x2d, %edx
orl %edx, %ecx
jne 0x7812
testq %rbx, %rbx
je 0x7a88
movq %r13, %rdi
callq 0x7f85
movl -0x2c(%rbp), %ecx
movl %ecx, %edx
xorl $0x5d, %edx
orl %eax, %edx
je 0x7a88
testl %ecx, %ecx
je 0x7a88
movl %ecx, -0x4(%r12)
jmp 0x7824
movl %eax, -0x140(%rbp,%rbx)
movl %eax, -0x13c(%rbp,%rbx)
addq $0x8, %rbx
movq %r13, %rdi
callq 0x7f85
movl %eax, %ecx
cmpq $0xfc, %rbx
setl %dl
jl 0x77ba
jmp 0x7a97
testb $0x1, %dl
je 0x7a97
leaq -0x140(%rbp), %rax
cmpq %r12, %rax
jae 0x7893
movq %rax, %rcx
movl (%rcx), %edx
movl (%rax), %esi
cmpl %esi, %edx
jae 0x7875
movl %edx, -0x2c(%rbp)
movl %esi, (%rcx)
movl %edx, (%rax)
movl 0x4(%rcx), %edx
movl %edx, -0x2c(%rbp)
movl 0x4(%rax), %esi
movl %esi, 0x4(%rcx)
movl %edx, 0x4(%rax)
movq %rcx, %rdx
addq $0x8, %rdx
movq %rdx, %rcx
cmpq %r12, %rdx
jb 0x7857
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, %rax
cmpq %r12, %rcx
jb 0x7854
movq 0x6b1e(%rip), %rax      # 0xe3b8
leaq 0x8(%rax), %rcx
testq %rbx, %rbx
je 0x7909
movl -0x140(%rbp), %edx
movl %edx, 0x8(%rax)
movl -0x13c(%rbp), %edx
movl %edx, 0xc(%rax)
leaq -0x138(%rbp), %rsi
cmpq %r12, %rsi
jae 0x7905
movq %rcx, %rdx
movq %rsi, %rcx
movl (%rsi), %esi
movl 0x4(%rdx), %edi
movl %edi, %r8d
incl %r8d
cmpl %r8d, %esi
jbe 0x78e9
leaq 0x8(%rdx), %rdi
movl %esi, 0x8(%rdx)
movl 0x4(%rcx), %esi
movl %esi, 0xc(%rdx)
movq %rdi, %rdx
jmp 0x78f3
movl 0x4(%rcx), %esi
cmpl %edi, %esi
jb 0x78f3
movl %esi, 0x4(%rdx)
movq %rcx, %rdi
addq $0x8, %rdi
movq %rdi, %rsi
movq %rdx, %rcx
cmpq %r12, %rdi
jb 0x78c4
addq $0x8, %rcx
movq %rcx, (%rax)
movl -0x3c(%rbp), %r12d
jmp 0x7581
leaq 0x1c14(%rip), %rdi      # 0x9530
callq 0x8064
xorl %eax, %eax
jmp 0x7a76
movl $0x80, %ebx
movl %ebx, %edi
callq 0x7c16
movl $0xff, %edi
callq 0x7b6a
movl %ebx, %edi
callq 0x7c16
cmpl $0x0, 0x6850(%rip)      # 0xe19c
jne 0x7ae7
movq 0x69e7(%rip), %rax      # 0xe340
leaq -0x10(%rax), %rcx
movq %rcx, 0x69dc(%rip)      # 0xe340
movq -0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq -0x38(%rbp), %rbx
leaq 0x1088(%rbx), %rax
cmpl $0xff, 0x1088(%rbx)
je 0x79b0
movq %rax, %rcx
leaq 0x10(%rcx), %rsi
movq (%rsi), %rdx
leaq 0x10(%rdx), %rsi
cmpl $0xc2, (%rdx)
je 0x798d
movq %rdx, 0x10(%rcx)
leaq 0x18(%rcx), %rdx
cmpl $0xff, 0x18(%rcx)
movq %rdx, %rcx
jne 0x7989
movq 0x66e9(%rip), %r14      # 0xe0a0
movl %r14d, %ecx
subl %eax, %ecx
addl $0x1100, %ecx           # imm = 0x1100
movslq %ecx, %rsi
movq %rbx, %rdi
callq 0x21f0
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x7a54
movq %rax, %rcx
movl %ecx, %esi
subl %ebx, %esi
movslq %esi, %rdx
movq %r14, %rsi
addq %rdx, %rsi
movq %rsi, 0x66ac(%rip)      # 0xe0a0
leaq 0x1088(%rax), %rdi
cmpq %rsi, %rdi
jae 0x7a4e
addq $0x1090, %rax           # imm = 0x1090
movl -0x8(%rax), %edi
movl %edi, %r8d
addl $0xffffff7d, %r8d       # imm = 0xFFFFFF7D
cmpl $0x4, %r8d
ja 0x7a22
movq %rax, %r9
cmpl $0x1, %r8d
jne 0x7a36
addl $0xffffff3b, %edi       # imm = 0xFFFFFF3B
cmpl $0x2, %edi
jae 0x7a39
movq (%rax), %r9
addq %rdx, %r9
movq %r9, (%rax)
addq %rdx, (%r9)
addq %rdx, 0x8(%rax)
leaq -0x8(%rax), %rdi
addq $0x18, %rax
addq $0x18, %rdi
cmpq %rsi, %rdi
jb 0x7a06
addq %rdx, (%rcx)
movq %rcx, %rbx
movq %rbx, -0x38(%rbp)
cmpl $0x0, 0x6651(%rip)      # 0xe0b0
je 0x7a72
movq -0x38(%rbp), %rdi
callq 0x2030
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl 0x6622(%rip)            # 0xe0b0
leaq 0x1ad6(%rip), %rdi      # 0x956b
jmp 0x7aa4
incl 0x6613(%rip)            # 0xe0b0
leaq 0x1ad6(%rip), %rdi      # 0x957a
callq 0x8064
leaq 0x6610(%rip), %rdi      # 0xe0c0
movl $0x1, %esi
callq 0x2200
incl 0x65f0(%rip)            # 0xe0b0
leaq 0x1b32(%rip), %rdi      # 0x95f9
jmp 0x7aa4
incl 0x65e1(%rip)            # 0xe0b0
leaq 0x1b0d(%rip), %rdi      # 0x95e3
jmp 0x7aa4
incl 0x65d2(%rip)            # 0xe0b0
leaq 0x1ac7(%rip), %rdi      # 0x95ac
jmp 0x7aa4
incl 0x65c3(%rip)            # 0xe0b0
leaq 0x1a4a(%rip), %rdi      # 0x953e
jmp 0x7aa4