// File: Laakeri[P]maxpre/src/preprocessor.cpp
// Function: maxPreprocessor::Preprocessor::validPreTechniques(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const
bool Preprocessor::validPreTechniques(string techniques) const {
	int sb = 0;
	string vt = "bus";
	for (int i = 0; i < (int)techniques.size(); i++) {
		if(techniques[i] == '[') {
			sb++;
		}
		else if(techniques[i] == ']') {
			sb--;
			if (sb < 0) return false;
			if (techniques[i - 1] == '[') return false;
		}
		else {
			bool f = false;
			for (char c : vt) {
				if (techniques[i] == c) {
					f = true;
					break;
				}
			}
			if (!f) return false;
		}
	}
	if (sb != 0) return false;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rsi, -0x90(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x4620
movq -0x88(%rbp), %rdx
leaq 0x589d0(%rip), %rsi     # 0x870df
leaq -0x40(%rbp), %rdi
callq 0xa430
jmp 0x2e71a
leaq -0x41(%rbp), %rdi
callq 0x43f0
movl $0x0, -0x58(%rbp)
movq -0x90(%rbp), %rdi
movl -0x58(%rbp), %eax
movl %eax, -0x94(%rbp)
callq 0x42a0
movq %rax, %rcx
movl -0x94(%rbp), %eax
cmpl %ecx, %eax
jge 0x2e8ee
movq -0x90(%rbp), %rdi
movslq -0x58(%rbp), %rsi
callq 0x46b0
movq %rax, -0xa0(%rbp)
jmp 0x2e769
movq -0xa0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x2e7ba
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2e8de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x43f0
jmp 0x2e923
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4240
jmp 0x2e923
movq -0x90(%rbp), %rdi
movslq -0x58(%rbp), %rsi
callq 0x46b0
movq %rax, -0xa8(%rbp)
jmp 0x2e7d3
movq -0xa8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0x2e842
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x2e801
movb $0x0, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0x2e90c
movq -0x90(%rbp), %rdi
movl -0x58(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x46b0
movq %rax, -0xb0(%rbp)
jmp 0x2e81e
movq -0xb0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x2e83d
movb $0x0, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0x2e90c
jmp 0x2e8dc
movb $0x0, -0x5d(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x4350
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
callq 0x4210
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xa670
testb $0x1, %al
jne 0x2e87b
jmp 0x2e8c7
leaq -0x70(%rbp), %rdi
callq 0xa6b0
movq -0x90(%rbp), %rdi
movb (%rax), %al
movb %al, -0x79(%rbp)
movslq -0x58(%rbp), %rsi
callq 0x46b0
movq %rax, -0xb8(%rbp)
jmp 0x2e8a2
movq -0xb8(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x79(%rbp), %ecx
cmpl %ecx, %eax
jne 0x2e8ba
movb $0x1, -0x5d(%rbp)
jmp 0x2e8c7
jmp 0x2e8bc
leaq -0x70(%rbp), %rdi
callq 0xa6d0
jmp 0x2e868
testb $0x1, -0x5d(%rbp)
jne 0x2e8da
movb $0x0, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0x2e90c
jmp 0x2e8dc
jmp 0x2e8de
jmp 0x2e8e0
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x2e72a
cmpl $0x0, -0x1c(%rbp)
je 0x2e901
movb $0x0, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0x2e90c
movb $0x1, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4240
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x4610
nopl (%rax)