// File: /workspace/github_cpp_makefile_star2_O3/szmer[P]brill/./src/rules_scoretab.cpp
// Function: RulesScoreTab::inc_good_ext(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void RulesScoreTab::inc_good_ext(int rule_type, string cue1, string cue2, string alter_tag, string target) {

	long long rule_id = rule_type * EXT_RULE_RANGE
			+ tag_index[ cue1 ] * tag_index.size()*tag_index.size()*tag_index.size()
			+ tag_index[ cue2 ] * tag_index.size()*tag_index.size()
			+ tag_index[ alter_tag ] * tag_index.size()
			+ tag_index[ target ];

	if(tab.find(rule_id) == tab.end())  // if there's no entry for this rule, create one
		tab[ rule_id ] = RuleScore(cue1, cue2, alter_tag, target, rule_id);

	tab[rule_id].good ++;
	eligible_rules.insert(rule_id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %r9, -0xb0(%rbp)
movq %r8, -0x38(%rbp)
movq %rcx, %rbx
movq %rdi, %r14
movslq %esi, %rax
movabsq $0xe6f93c791, %r13      # imm = 0xE6F93C791
imulq %rax, %r13
leaq 0x68(%rdi), %r15
movq %r15, %rdi
movq %rdx, -0xa0(%rbp)
movq %rdx, %rsi
callq 0xac8e
movslq (%rax), %rax
movq 0x90(%r14), %r12
imulq %r12, %rax
imulq %r12, %r12
imulq %rax, %r12
movq %r15, %rdi
movq %rbx, -0xa8(%rbp)
movq %rbx, %rsi
callq 0xac8e
movslq (%rax), %rax
movq 0x90(%r14), %rbx
imulq %rbx, %rbx
imulq %rax, %rbx
addq %r13, %rbx
movq %r15, %rdi
movq -0x38(%rbp), %rsi
callq 0xac8e
movslq (%rax), %r13
imulq 0x90(%r14), %r13
addq %rbx, %r13
movq %r14, %rbx
movq -0xb0(%rbp), %r14
addq %r12, %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0xac8e
movslq (%rax), %rax
addq %r13, %rax
movq %rax, -0x30(%rbp)
leaq 0x38(%rbx), %r15
movq 0x48(%rbx), %rcx
testq %rcx, %rcx
je 0x583e
leaq 0x40(%rbx), %rsi
movq %rsi, %rdx
xorl %edi, %edi
cmpq %rax, 0x20(%rcx)
setl %dil
cmovgeq %rcx, %rdx
movq 0x10(%rcx,%rdi,8), %rcx
testq %rcx, %rcx
jne 0x5817
cmpq %rsi, %rdx
je 0x583e
cmpq 0x20(%rdx), %rax
jge 0x5a48
leaq -0xc0(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0xa0(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0xbec8
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0xa8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %rdi
callq 0xbec8
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rdi
callq 0xbec8
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0xbec8
movq -0x30(%rbp), %r9
leaq -0x160(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x98(%rbp), %rdx
leaq -0x78(%rbp), %rcx
leaq -0x58(%rbp), %r8
callq 0x50bc
leaq -0x30(%rbp), %rsi
movq %r15, %r12
movq %r15, %rdi
callq 0xaed4
movq %rax, %r14
leaq -0x160(%rbp), %rsi
movq %rax, %rdi
callq 0x2290
leaq 0x20(%r14), %rdi
leaq -0x140(%rbp), %rsi
callq 0x2290
leaq 0x40(%r14), %rdi
leaq -0x120(%rbp), %rsi
callq 0x2290
movq %r14, %rdi
addq $0x60, %rdi
leaq -0x100(%rbp), %r15
movq %r15, %rsi
callq 0x2290
movq 0x20(%r15), %rax
movq %rax, 0x80(%r14)
movq 0x28(%r15), %rax
movq %rax, 0x88(%r14)
movq (%r15), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x5979
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x110(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5998
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x130(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq %r12, %r15
je 0x59ba
movq -0x130(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x150(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59d9
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x59f2
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5a0b
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x5a2d
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2230
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x5a48
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2230
leaq -0x30(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xaed4
incl 0x88(%rax)
addq $0x8, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd762
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
callq 0xaf3c
jmp 0x5a92
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5ab0
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x5ab0
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5ace
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x5ace
movq %rax, %rbx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x5af5
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2230
jmp 0x5af5
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x5b10
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x23a0