// File: reedoolang[P]reedoo/cond.cc
// Function: eval_cond(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool eval_cond(string cond) {

	string term = "";
	bool state = 0;
	int and_or_count = 0;
	bool r = true;

	for (int i = 0; i < cond.size(); i++) {
		
		if (cond[i] == '"') {
			if (state == 0) {
				state = 1;
			} else {
				state = 0;
			}
		}

		if (cond[i] == ' ' and state == 0) {
			terms.push_back(term);
			term = "";
		}
		else {
			term += cond[i];	
		}
	}

	for (int i = 0; i < terms.size(); i++) {
		//cout << terms[i] << " ";
	}
	//cout << endl;

	for (int i = 0; i < terms.size(); i++) {

		if (terms[i] == "or") {
			and_or_count++;
			if (i-3 >= 0 and i+3 < terms.size()) {
				if (terms[i] == "or") {
					if (terms[i-3] == terms[i-1]) {
						terms.clear();
						return true;
					} else {
						r = false;
					}

					if (terms[i+1] == terms[i+3]) {
						r = true;
					} else {
						r = false;
					}
				}
				
			}
		}

		if (terms[i] == "and") {
			and_or_count++;
			if (i-3 >= 0 and i+3 < terms.size()) {

				if (terms[i-3] != terms[i-1]) {
					terms.clear();
					return false;
				} else {
					r = true;
				}

				if (terms[i+1] != terms[i+3]) {
					r= false;
				} else {
					r = true;
				}
			}
		}
	}

	if (and_or_count == 0) {
		for (int i = 0; i < terms.size(); i++) {
			if (terms[i] == terms[i+2]) {
				terms.clear();
				return true;
			} else {
				terms.clear();
				return false;
			}
		}
	}

	terms.clear();
	
	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x78(%rbp)
movq %rdi, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x3470
movq -0x70(%rbp), %rdx
leaq 0x1697(%rip), %rsi      # 0x13192
leaq -0x30(%rbp), %rdi
callq 0x4990
jmp 0x11b06
leaq -0x31(%rbp), %rdi
callq 0x3300
movb $0x0, -0x45(%rbp)
movl $0x0, -0x4c(%rbp)
movb $0x1, -0x4d(%rbp)
movl $0x0, -0x54(%rbp)
movq -0x78(%rbp), %rdi
movslq -0x54(%rbp), %rax
movq %rax, -0x80(%rbp)
callq 0x3210
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
jae 0x11c4d
movq -0x78(%rbp), %rdi
movslq -0x54(%rbp), %rsi
callq 0x34c0
movq %rax, -0x88(%rbp)
jmp 0x11b5c
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x11bb8
movb -0x45(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x11bb2
movb $0x1, -0x45(%rbp)
jmp 0x11bb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x3300
jmp 0x1204a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x31d0
jmp 0x1204a
movb $0x0, -0x45(%rbp)
jmp 0x11bb8
movq -0x78(%rbp), %rdi
movslq -0x54(%rbp), %rsi
callq 0x34c0
movq %rax, -0x90(%rbp)
jmp 0x11bce
movq -0x90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x11c10
movb -0x45(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x11c10
leaq 0x6a77(%rip), %rdi      # 0x18668
leaq -0x30(%rbp), %rsi
callq 0x9050
jmp 0x11bfc
leaq 0x158f(%rip), %rsi      # 0x13192
leaq -0x30(%rbp), %rdi
callq 0x33a0
jmp 0x11c0e
jmp 0x11c3d
movq -0x78(%rbp), %rdi
movslq -0x54(%rbp), %rsi
callq 0x34c0
movq %rax, -0x98(%rbp)
jmp 0x11c26
movq -0x98(%rbp), %rax
movsbl (%rax), %esi
leaq -0x30(%rbp), %rdi
callq 0x31e0
jmp 0x11c3b
jmp 0x11c3d
jmp 0x11c3f
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x11b25
movl $0x0, -0x58(%rbp)
movslq -0x58(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq 0x6a02(%rip), %rdi      # 0x18668
callq 0x53c0
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x11c87
jmp 0x11c7c
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x11c54
movl $0x0, -0x5c(%rbp)
movslq -0x5c(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq 0x69c8(%rip), %rdi      # 0x18668
callq 0x53c0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jae 0x11f6c
movslq -0x5c(%rbp), %rsi
leaq 0x69a5(%rip), %rdi      # 0x18668
callq 0xc5f0
movq %rax, %rdi
leaq 0x145d(%rip), %rsi      # 0x1312f
callq 0x4be0
movb %al, -0xa9(%rbp)
jmp 0x11cdf
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x11cee
jmp 0x11e26
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movl -0x5c(%rbp), %eax
subl $0x3, %eax
cmpl $0x0, %eax
jl 0x11e24
movl -0x5c(%rbp), %eax
addl $0x3, %eax
cltq
movq %rax, -0xb8(%rbp)
leaq 0x694c(%rip), %rdi      # 0x18668
callq 0x53c0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
cmpq %rcx, %rax
jae 0x11e24
movslq -0x5c(%rbp), %rsi
leaq 0x6929(%rip), %rdi      # 0x18668
callq 0xc5f0
movq %rax, %rdi
leaq 0x13e1(%rip), %rsi      # 0x1312f
callq 0x4be0
movb %al, -0xb9(%rbp)
jmp 0x11d5b
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x11d6a
jmp 0x11e22
movl -0x5c(%rbp), %eax
subl $0x3, %eax
movslq %eax, %rsi
leaq 0x68ee(%rip), %rdi      # 0x18668
callq 0xc5f0
movq %rax, -0xc8(%rbp)
movl -0x5c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
leaq 0x68d2(%rip), %rdi      # 0x18668
callq 0xc5f0
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x8e00
testb $0x1, %al
jne 0x11db0
jmp 0x11dcc
leaq 0x68b1(%rip), %rdi      # 0x18668
callq 0x10c10
movb $0x1, -0x1(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x12033
movb $0x0, -0x4d(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x6888(%rip), %rdi      # 0x18668
callq 0xc5f0
movq %rax, -0xd0(%rbp)
movl -0x5c(%rbp), %eax
addl $0x3, %eax
movslq %eax, %rsi
leaq 0x686c(%rip), %rdi      # 0x18668
callq 0xc5f0
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0x8e00
testb $0x1, %al
jne 0x11e16
jmp 0x11e1c
movb $0x1, -0x4d(%rbp)
jmp 0x11e20
movb $0x0, -0x4d(%rbp)
jmp 0x11e22
jmp 0x11e24
jmp 0x11e26
movslq -0x5c(%rbp), %rsi
leaq 0x6837(%rip), %rdi      # 0x18668
callq 0xc5f0
movq %rax, %rdi
leaq 0x12eb(%rip), %rsi      # 0x1312b
callq 0x4be0
movb %al, -0xd1(%rbp)
jmp 0x11e4d
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x11e5c
jmp 0x11f5c
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movl -0x5c(%rbp), %eax
subl $0x3, %eax
cmpl $0x0, %eax
jl 0x11f5a
movl -0x5c(%rbp), %eax
addl $0x3, %eax
cltq
movq %rax, -0xe0(%rbp)
leaq 0x67de(%rip), %rdi      # 0x18668
callq 0x53c0
movq %rax, %rcx
movq -0xe0(%rbp), %rax
cmpq %rcx, %rax
jae 0x11f5a
movl -0x5c(%rbp), %eax
subl $0x3, %eax
movslq %eax, %rsi
leaq 0x67b6(%rip), %rdi      # 0x18668
callq 0xc5f0
movq %rax, -0xe8(%rbp)
movl -0x5c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
leaq 0x679a(%rip), %rdi      # 0x18668
callq 0xc5f0
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0xc610
testb $0x1, %al
jne 0x11ee8
jmp 0x11f04
leaq 0x6779(%rip), %rdi      # 0x18668
callq 0x10c10
movb $0x0, -0x1(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x12033
movb $0x1, -0x4d(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x6750(%rip), %rdi      # 0x18668
callq 0xc5f0
movq %rax, -0xf0(%rbp)
movl -0x5c(%rbp), %eax
addl $0x3, %eax
movslq %eax, %rsi
leaq 0x6734(%rip), %rdi      # 0x18668
callq 0xc5f0
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0xc610
testb $0x1, %al
jne 0x11f4e
jmp 0x11f54
movb $0x0, -0x4d(%rbp)
jmp 0x11f58
movb $0x1, -0x4d(%rbp)
jmp 0x11f5a
jmp 0x11f5c
jmp 0x11f5e
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x11c8e
cmpl $0x0, -0x4c(%rbp)
jne 0x12018
movl $0x0, -0x64(%rbp)
movslq -0x64(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq 0x66d9(%rip), %rdi      # 0x18668
callq 0x53c0
movq %rax, %rcx
movq -0xf8(%rbp), %rax
cmpq %rcx, %rax
jae 0x12016
movslq -0x64(%rbp), %rsi
leaq 0x66ba(%rip), %rdi      # 0x18668
callq 0xc5f0
movq %rax, -0x100(%rbp)
movl -0x64(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
leaq 0x669e(%rip), %rdi      # 0x18668
callq 0xc5f0
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0x8e00
testb $0x1, %al
jne 0x11fe4
jmp 0x11ffd
leaq 0x667d(%rip), %rdi      # 0x18668
callq 0x10c10
movb $0x1, -0x1(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x12033
leaq 0x6664(%rip), %rdi      # 0x18668
callq 0x10c10
movb $0x0, -0x1(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x12033
jmp 0x12018
leaq 0x6649(%rip), %rdi      # 0x18668
callq 0x10c10
movb -0x4d(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x31d0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3460