// File: /workspace/github_c_makefile_star2_O3/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 0x21b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x7891
movl $0x1088, %eax           # imm = 0x1088
addq -0x30(%rbp), %rax
movq %rax, 0x6b7b(%rip)      # 0xe090
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, 0x6b74(%rip)      # 0xe098
movl $0x0, 0x6b72(%rip)      # 0xe0a0
leaq 0x6b7b(%rip), %rdi      # 0xe0b0
callq 0x2160
testl %eax, %eax
jne 0x79d4
xorl %edx, %edx
movb %dl, 0x6c2e(%rip)       # 0xe178
movq %r15, 0x6c2f(%rip)      # 0xe180
movl %edx, 0x6c31(%rip)      # 0xe188
movl %edx, 0x6c2f(%rip)      # 0xe18c
leaq 0x6c8c(%rip), %rcx      # 0xe1f0
movq %rcx, 0x6dc5(%rip)      # 0xe330
movb %dl, 0x6e27(%rip)       # 0xe398
movl %edx, 0x6e25(%rip)      # 0xe39c
leaq 0x6c16(%rip), %rax      # 0xe194
movq %rax, 0x6c5b(%rip)      # 0xe1e0
movl $0x7f, 0x6c01(%rip)     # 0xe190
leaq 0x6dae(%rip), %rax      # 0xe344
movq %rax, 0x6df3(%rip)      # 0xe390
movl %edx, 0x6d9d(%rip)      # 0xe340
leaq 0x6df6(%rip), %r15      # 0xe3a0
leaq 0x1eb3(%rip), %r13      # 0x9464
leaq -0x34(%rbp), %r12
movl %ebx, -0x3c(%rbp)
movq %r15, %rdi
callq 0x7fee
movl 0x6dda(%rip), %ecx      # 0xe3a0
orl %r14d, %eax
je 0x75e1
movl $0x7f, %eax
testl %ecx, %ecx
je 0x78a4
movl %eax, %edi
callq 0x7be3
jmp 0x75b8
cmpl $0x3e, %ecx
jg 0x7605
movl %ecx, %eax
addl $-0x24, %eax
cmpl $0xa, %eax
ja 0x7701
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0xc4, %eax
jmp 0x75d8
cmpl $0x5d, %ecx
jg 0x769f
cmpl $0x3f, %ecx
je 0x76f7
cmpl $0x5b, %ecx
jne 0x7709
movl 0x6b62(%rip), %eax      # 0xe188
cmpq $0x10, %rax
jae 0x7a36
movl %eax, %ecx
incl %ecx
movl %ecx, 0x6b4e(%rip)      # 0xe188
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %rax
addq 0x6a4c(%rip), %rax      # 0xe098
movq %rax, 0x6d55(%rip)      # 0xe3a8
movq %r12, %rdi
callq 0x7fee
movl %eax, %ecx
movl $0xc5, %esi
xorl %edx, %edx
testl %eax, %eax
jne 0x7713
cmpl $0x5e, -0x34(%rbp)
movl %esi, %eax
jne 0x7715
movq %r12, %rdi
callq 0x7fee
movl %eax, %ecx
movabsq $0xa0000000a, %rax      # imm = 0xA0000000A
movq %rax, -0x140(%rbp)
movl $0x8, %edx
movl $0xc6, %eax
jmp 0x7715
movl $0xc3, %eax
cmpl $0x5e, %ecx
je 0x75d8
cmpl $0x7c, %ecx
jne 0x7709
movl $0x83, %edi
jmp 0x7887
movl $0x86, %edi
jmp 0x7887
movl %ebx, %eax
cmpl $0xff, %ebx
jne 0x7871
jmp 0x78a4
movl $0x81, %edi
jmp 0x7887
movl $0x85, %edi
jmp 0x7887
movl $0x82, %edi
jmp 0x7887
movl $0x87, %edi
jmp 0x7887
testl %ecx, %ecx
je 0x78a4
movl $0x7f, %eax
jmp 0x75d8
movl %esi, %eax
movq %rdx, %r13
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
testl %eax, %eax
je 0x7a04
leaq -0x140(,%r13), %rbx
addq %rbp, %rbx
movl %eax, %edx
xorl $0x5d, %edx
orl %ecx, %edx
je 0x779d
movl %eax, %edx
xorl $0x2d, %edx
orl %edx, %ecx
jne 0x7771
testq %r13, %r13
je 0x7a04
movq %r12, %rdi
callq 0x7fee
movl -0x34(%rbp), %ecx
movl %ecx, %edx
xorl $0x5d, %edx
orl %eax, %edx
je 0x7a04
testl %ecx, %ecx
je 0x7a04
movl %ecx, -0x4(%rbx)
jmp 0x7785
movl %eax, -0x140(%rbp,%r13)
movl %eax, -0x13c(%rbp,%r13)
addq $0x8, %r13
movq %r12, %rdi
callq 0x7fee
movl %eax, %ecx
cmpq $0xfc, %r13
jl 0x771b
jmp 0x7a13
leaq -0x140(%rbp), %rax
cmpq %rbx, %rax
jae 0x77e2
movq %rax, %rcx
movl (%rcx), %edx
movl (%rax), %esi
cmpl %esi, %edx
jae 0x77c4
movl %esi, (%rcx)
movl %edx, (%rax)
movl 0x4(%rcx), %edx
movl 0x4(%rax), %esi
movl %esi, 0x4(%rcx)
movl %edx, 0x4(%rax)
movq %rcx, %rdx
addq $0x8, %rdx
movq %rdx, %rcx
cmpq %rbx, %rdx
jb 0x77ac
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, %rax
cmpq %rbx, %rcx
jb 0x77a9
movq 0x6bbf(%rip), %rax      # 0xe3a8
leaq 0x8(%rax), %rcx
testq %r13, %r13
je 0x7861
movl -0x140(%rbp), %edx
movl %edx, 0x8(%rax)
movl -0x13c(%rbp), %edx
movl %edx, 0xc(%rax)
leaq -0x138(%rbp), %rsi
cmpq %rbx, %rsi
leaq 0x1c4f(%rip), %r13      # 0x9464
jae 0x785b
movq %rcx, %rdx
movq %rsi, %rcx
movl (%rsi), %esi
movl 0x4(%rdx), %edi
movl %edi, %r8d
incl %r8d
cmpl %r8d, %esi
jbe 0x783f
leaq 0x8(%rdx), %rdi
movl %esi, 0x8(%rdx)
movl 0x4(%rcx), %esi
movl %esi, 0xc(%rdx)
movq %rdi, %rdx
jmp 0x7849
movl 0x4(%rcx), %esi
cmpl %edi, %esi
jb 0x7849
movl %esi, 0x4(%rdx)
movq %rcx, %rdi
addq $0x8, %rdi
movq %rdi, %rsi
movq %rdx, %rcx
cmpq %rbx, %rdi
jb 0x781a
addq $0x8, %rcx
jmp 0x7868
leaq 0x1bfc(%rip), %r13      # 0x9464
movq %rcx, (%rax)
movl -0x38(%rbp), %eax
movl -0x3c(%rbp), %ebx
movl %eax, %ecx
movl %eax, %edi
andl $0xc0, %ecx
cmpl $0x80, %ecx
jne 0x75d8
callq 0x7a79
jmp 0x75b8
leaq 0x1c88(%rip), %rdi      # 0x9520
callq 0x80d0
xorl %eax, %eax
jmp 0x79f2
movl $0x80, %ebx
movl %ebx, %edi
callq 0x7c80
movl $0xff, %edi
callq 0x7be3
movl %ebx, %edi
callq 0x7c80
cmpl $0x0, 0x68c4(%rip)      # 0xe18c
jne 0x7a45
movq 0x6a5b(%rip), %rax      # 0xe330
leaq -0x10(%rax), %rcx
movq %rcx, 0x6a50(%rip)      # 0xe330
movq -0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
movq -0x30(%rbp), %rbx
leaq 0x1088(%rbx), %rax
cmpl $0xff, 0x1088(%rbx)
je 0x792c
movq %rax, %rcx
leaq 0x10(%rcx), %rsi
movq (%rsi), %rdx
leaq 0x10(%rdx), %rsi
cmpl $0xc2, (%rdx)
je 0x7909
movq %rdx, 0x10(%rcx)
leaq 0x18(%rcx), %rdx
cmpl $0xff, 0x18(%rcx)
movq %rdx, %rcx
jne 0x7905
movq 0x675d(%rip), %r14      # 0xe090
movl %r14d, %ecx
subl %eax, %ecx
addl $0x1100, %ecx           # imm = 0x1100
movslq %ecx, %rsi
movq %rbx, %rdi
callq 0x21e0
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x79d0
movq %rax, %rcx
movl %ecx, %esi
subl %ebx, %esi
movslq %esi, %rdx
movq %r14, %rsi
addq %rdx, %rsi
movq %rsi, 0x6720(%rip)      # 0xe090
leaq 0x1088(%rax), %rdi
cmpq %rsi, %rdi
jae 0x79ca
addq $0x1090, %rax           # imm = 0x1090
movl -0x8(%rax), %edi
movl %edi, %r8d
addl $0xffffff7d, %r8d       # imm = 0xFFFFFF7D
cmpl $0x4, %r8d
ja 0x799e
movq %rax, %r9
cmpl $0x1, %r8d
jne 0x79b2
addl $0xffffff3b, %edi       # imm = 0xFFFFFF3B
cmpl $0x2, %edi
jae 0x79b5
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 0x7982
addq %rdx, (%rcx)
movq %rcx, %rbx
movq %rbx, -0x30(%rbp)
cmpl $0x0, 0x66c5(%rip)      # 0xe0a0
je 0x79ee
movq -0x30(%rbp), %rdi
callq 0x2030
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl 0x6696(%rip)            # 0xe0a0
leaq 0x1b4a(%rip), %rdi      # 0x955b
jmp 0x7a20
incl 0x6687(%rip)            # 0xe0a0
leaq 0x1b4a(%rip), %rdi      # 0x956a
callq 0x80d0
leaq 0x6684(%rip), %rdi      # 0xe0b0
movl $0x1, %esi
callq 0x21f0
incl 0x6664(%rip)            # 0xe0a0
leaq 0x1b59(%rip), %rdi      # 0x959c
jmp 0x7a20
incl 0x6655(%rip)            # 0xe0a0
leaq 0x1adc(%rip), %rdi      # 0x952e
jmp 0x7a20