// File: /workspace/github_cpp_makefile_star2_O3/davinash[P]regex/src/regex.cpp
// Function: RegEx::Or()
bool RegEx::Or() {

	Table  UpperTable, LowerTable;

	if(!PopTable(LowerTable) || !PopTable(UpperTable))
		return false;

	RegExState *LeftTable	= new RegExState(m_nNextStateID++);
	RegExState *RightTable	= new RegExState(m_nNextStateID++);
	
	LeftTable->AddTransition(EPSILON, ((*(UpperTable.begin()))));
	LeftTable->AddTransition(EPSILON, ((*(LowerTable.begin()))));
	((*(UpperTable.rbegin())))->AddTransition(EPSILON, RightTable);
	((*(LowerTable.rbegin())))->AddTransition(EPSILON, RightTable);

	LowerTable.push_back(RightTable);
	UpperTable.insert(UpperTable.begin(),LeftTable);
	UpperTable.insert(UpperTable.end(), LowerTable.begin(), LowerTable.end());

	m_CharacterClassStack.push(UpperTable);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rsp, %rsi
movq %rax, 0x10(%rsi)
movaps %xmm0, (%rsi)
callq 0x500e
testb %al, %al
je 0x5afe
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x500e
testb %al, %al
je 0x5afe
movl $0x78, %edi
callq 0x2150
movq %rax, %r14
movl 0x14c(%rbx), %r13d
leal 0x1(%r13), %eax
movl %eax, 0x44(%rsp)
movl %eax, 0x14c(%rbx)
leaq 0x83a1(%rip), %rbp      # 0xdd80
addq $0x10, %rbp
movq %rbp, (%r14)
leaq 0x10(%r14), %rax
xorl %r12d, %r12d
movl %r12d, 0x10(%r14)
movq %r12, 0x18(%r14)
movq %rax, 0x20(%r14)
movq %rax, 0x28(%r14)
movq %r12, 0x30(%r14)
movq %r14, %rax
addq $0x40, %rax
movl %r12d, 0x40(%r14)
movq %r12, 0x48(%r14)
movq %rax, 0x50(%r14)
movq %rax, 0x58(%r14)
movq %r12, 0x60(%r14)
movl %r13d, 0x68(%r14)
movb $0x0, 0x6c(%r14)
movl %r12d, 0x70(%r14)
movq %r14, 0x50(%rsp)
movl $0x78, %edi
callq 0x2150
movq %rax, %r15
addl $0x2, %r13d
movl %r13d, 0x14c(%rbx)
movq %rbp, (%rax)
addq $0x10, %rax
movl %r12d, 0x10(%r15)
movq %r12, 0x18(%r15)
movq %rax, 0x20(%r15)
movq %rax, 0x28(%r15)
movq %r12, 0x30(%r15)
movq %r15, %rax
addq $0x40, %rax
movl %r12d, 0x40(%r15)
movq %r12, 0x48(%r15)
movq %rax, 0x50(%r15)
movq %rax, 0x58(%r15)
movq %r12, 0x60(%r15)
movl 0x44(%rsp), %eax
movl %eax, 0x68(%r15)
movb $0x0, 0x6c(%r15)
movl %r12d, 0x70(%r15)
movq %r15, 0x48(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x94d8
movq (%rsp), %rax
movq (%rax), %rdx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x94d8
movq 0x28(%rsp), %rax
movq -0x8(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x94d8
movq 0x8(%rsp), %rax
movq -0x8(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x94d8
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x5b02
movq %r15, (%rsi)
addq $0x8, 0x8(%rsp)
jmp 0x5b0f
xorl %ebx, %ebx
jmp 0x5b4b
movq %rsp, %rdi
leaq 0x48(%rsp), %rdx
callq 0x8bf2
leaq 0x20(%rsp), %rdi
movq (%rdi), %rsi
leaq 0x50(%rsp), %rdx
callq 0x7aa0
leaq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq (%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0x86e4
addq $0x30, %rbx
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x88e4
movb $0x1, %bl
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5b61
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5b78
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5b99
jmp 0x5b99
jmp 0x5b99
jmp 0x5b99
jmp 0x5b99
jmp 0x5b99
jmp 0x5b99
jmp 0x5b99
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5bb2
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5bc9
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2260
nop