// File: 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
subq $0x200, %rsp            # imm = 0x200
movq %rdx, -0x1f8(%rbp)
movl %esi, %eax
movq -0x1f8(%rbp), %rsi
movq %rsi, -0x1f0(%rbp)
movq %rcx, -0x1d0(%rbp)
movq %r8, -0x1b0(%rbp)
movq %r9, -0x198(%rbp)
movq %rdi, -0x8(%rbp)
movl %eax, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x180(%rbp)
movslq -0xc(%rbp), %rax
movabsq $0xe6f93c791, %rcx      # imm = 0xE6F93C791
imulq %rcx, %rax
movq %rax, -0x1c8(%rbp)
addq $0x68, %rdi
callq 0xbd80
movq -0x180(%rbp), %rdi
movslq (%rax), %rax
movq %rax, -0x1e8(%rbp)
addq $0x68, %rdi
callq 0xbf20
movq -0x180(%rbp), %rdi
movq %rax, %rcx
movq -0x1e8(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x1e0(%rbp)
addq $0x68, %rdi
callq 0xbf20
movq -0x180(%rbp), %rdi
movq %rax, %rcx
movq -0x1e0(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x1d8(%rbp)
addq $0x68, %rdi
callq 0xbf20
movq -0x1d8(%rbp), %rcx
movq -0x1d0(%rbp), %rsi
movq -0x180(%rbp), %rdi
movq %rax, %rdx
movq -0x1c8(%rbp), %rax
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x1a8(%rbp)
addq $0x68, %rdi
callq 0xbd80
movq -0x180(%rbp), %rdi
movslq (%rax), %rax
movq %rax, -0x1c0(%rbp)
addq $0x68, %rdi
callq 0xbf20
movq -0x180(%rbp), %rdi
movq %rax, %rcx
movq -0x1c0(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x1b8(%rbp)
addq $0x68, %rdi
callq 0xbf20
movq -0x1b8(%rbp), %rcx
movq -0x1b0(%rbp), %rsi
movq -0x180(%rbp), %rdi
movq %rax, %rdx
movq -0x1a8(%rbp), %rax
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x190(%rbp)
addq $0x68, %rdi
callq 0xbd80
movq -0x180(%rbp), %rdi
movslq (%rax), %rax
movq %rax, -0x1a0(%rbp)
addq $0x68, %rdi
callq 0xbf20
movq -0x1a0(%rbp), %rcx
movq -0x198(%rbp), %rsi
movq -0x180(%rbp), %rdi
movq %rax, %rdx
movq -0x190(%rbp), %rax
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x188(%rbp)
addq $0x68, %rdi
callq 0xbd80
movq -0x180(%rbp), %rdi
movq %rax, %rcx
movq -0x188(%rbp), %rax
movslq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
addq $0x38, %rdi
leaq -0x38(%rbp), %rsi
callq 0xc8d0
movq -0x180(%rbp), %rdi
movq %rax, -0x40(%rbp)
addq $0x38, %rdi
callq 0xc900
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xc8a0
testb $0x1, %al
jne 0x7640
jmp 0x77d1
movq -0x1f0(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x3110
movq -0x1d0(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x3110
jmp 0x7668
movq -0x1b0(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x3110
jmp 0x767d
movq -0x198(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x3110
jmp 0x7692
movq -0x38(%rbp), %r9
leaq -0xd8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0x118(%rbp), %rdx
leaq -0x148(%rbp), %rcx
leaq -0x168(%rbp), %r8
callq 0x6de0
jmp 0x76c0
movq -0x180(%rbp), %rdi
addq $0x38, %rdi
leaq -0x38(%rbp), %rsi
callq 0xc930
movq %rax, -0x200(%rbp)
jmp 0x76dd
movq -0x200(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0xca10
leaq -0xd8(%rbp), %rdi
callq 0xca50
leaq -0x168(%rbp), %rdi
callq 0x3548
leaq -0x148(%rbp), %rdi
callq 0x3548
leaq -0x118(%rbp), %rdi
callq 0x3548
leaq -0xf8(%rbp), %rdi
callq 0x3548
jmp 0x77d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x77c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x77b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x77ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x779f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0xca50
leaq -0x168(%rbp), %rdi
callq 0x3548
leaq -0x148(%rbp), %rdi
callq 0x3548
leaq -0x118(%rbp), %rdi
callq 0x3548
leaq -0xf8(%rbp), %rdi
callq 0x3548
jmp 0x781e
movq -0x180(%rbp), %rdi
addq $0x38, %rdi
leaq -0x38(%rbp), %rsi
callq 0xc930
movq -0x180(%rbp), %rdi
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
addq $0x8, %rdi
leaq -0x38(%rbp), %rsi
callq 0xca70
movq %rax, -0x178(%rbp)
movb %dl, -0x170(%rbp)
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x120(%rbp), %rdi
callq 0x34a0
nopw (%rax,%rax)