// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/./bal/anf/anf.cpp
// Function: bal::Anf::evaluate(bal::VariablesArray const&, bal::VariablesArray const&, bal::VariablesArray const&) const
VariablesArray Anf::evaluate(const VariablesArray& value_template, const VariablesArray& value,
                                 const VariablesArray& result_template) const {
        assert(variables_size() > 0);
        VariablesArray variables(variables_size(), 1);
        variables.assign_sequence();
        variables.assign_template_from(value_template, value);
        
        evaluate(variables);
        
        VariablesArray result(result_template);
        variables.assign_template_into(result_template, result);
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x58(%rbp)
movq %rcx, %r13
movq %rdx, -0x30(%rbp)
movq %rsi, %r15
movq %rdi, -0x60(%rbp)
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x58(%rax)
testl %eax, %eax
je 0xe479
movq (%r15), %rax
movq %r15, %rdi
callq *0x58(%rax)
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xe5fc
cmpl $0x0, 0x8(%r12)
je 0xe2a2
movl $0x3, %eax
movq -0x50(%rbp), %rcx
xorl %edx, %edx
movl %eax, (%rcx,%rdx,4)
incq %rdx
movl -0x48(%rbp), %esi
addl $0x2, %eax
cmpq %rsi, %rdx
jb 0xe291
movq -0x30(%rbp), %rax
movl 0x8(%rax), %ecx
cmpl 0x8(%r13), %ecx
jne 0xe498
testl %ecx, %ecx
je 0xe398
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq (%r13), %rdx
xorl %esi, %esi
movl (%rdx,%rsi,4), %edi
cmpl $-0x1, %edi
je 0xe38a
movl (%rax,%rsi,4), %r10d
cmpl $-0x1, %r10d
je 0xe38a
cmpl %edi, %r10d
je 0xe38a
movl -0x48(%rbp), %r9d
movq -0x50(%rbp), %r8
cmpl $0x2, %r10d
jb 0xe348
movl %r10d, %r11d
shrl %r11d
decl %r11d
cmpl %r9d, %r11d
jae 0xe43b
movl %r10d, %r12d
andl $0x1, %r12d
xorl %edi, %r12d
movl %r12d, %edi
xorl $0x1, %edi
movl %r11d, %r13d
movl (%r8,%r13,4), %r11d
cmpl %edi, %r11d
je 0xe38a
orl $0x1, %r10d
leal -0x2(%rdi), %ebx
cmpl $-0x3, %ebx
setb %bl
cmpl %r10d, %edi
seta %r14b
testb %bl, %r14b
je 0xe355
movl %edi, %r11d
movl %r10d, %edi
jmp 0xe369
movl %edi, %r11d
cmpl $0x1, %edi
movl %r10d, %edi
ja 0xe369
jmp 0xe398
cmpl %r10d, %r11d
je 0xe37c
cmpl $-0x1, %r11d
je 0xe37c
xorl %r11d, %r10d
cmpl $0x1, %r10d
je 0xe37f
cmpl $-0x1, %edi
je 0xe38a
movl %r11d, %r10d
cmpl %edi, %r11d
jne 0xe2f3
jmp 0xe38a
movl %edi, %r12d
movl %r12d, (%r8,%r13,4)
movq -0x30(%rbp), %rcx
movl 0x8(%rcx), %ecx
incq %rsi
movl %ecx, %edi
cmpq %rdi, %rsi
jb 0xe2c8
leaq -0x50(%rbp), %rsi
movq %r15, %rdi
callq 0xddb8
movq -0x60(%rbp), %rbx
movq -0x58(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe74a
movl 0x1c(%r14), %eax
movl %eax, 0x1c(%rbx)
movl 0x8(%r14), %ecx
cmpl 0x8(%rbx), %ecx
jne 0xe4b7
testq %rcx, %rcx
je 0xe415
movq (%rbx), %rax
leaq (%rax,%rcx,4), %rcx
movq (%r14), %rdx
movq -0x50(%rbp), %rsi
movl (%rdx), %edi
leal 0x1(%rdi), %r8d
cmpl $0x3, %r8d
jb 0xe406
movl %edi, %r8d
shrl %r8d
decl %r8d
cmpl -0x48(%rbp), %r8d
jae 0xe45a
movl %r8d, %r8d
andl $0x1, %edi
xorl (%rsi,%r8,4), %edi
xorl $0x1, %edi
movl %edi, (%rax)
addq $0x4, %rdx
addq $0x4, %rax
cmpq %rcx, %rax
jb 0xe3de
cmpl $0x0, -0x38(%rbp)
je 0xe429
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0xe429
callq 0xb350
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3146a(%rip), %rdi     # 0x3f8ac
leaq 0x312e3(%rip), %rsi     # 0x3f72c
leaq 0x313f1(%rip), %rcx     # 0x3f841
movl $0x9d, %edx
callq 0xb180
leaq 0x314bd(%rip), %rdi     # 0x3f91e
leaq 0x312c4(%rip), %rsi     # 0x3f72c
leaq 0x31450(%rip), %rcx     # 0x3f8bf
movl $0xcb, %edx
callq 0xb180
leaq 0x31013(%rip), %rdi     # 0x3f493
leaq 0x30b98(%rip), %rsi     # 0x3f01f
leaq 0x3101a(%rip), %rcx     # 0x3f4a8
movl $0x165, %edx            # imm = 0x165
callq 0xb180
leaq 0x31383(%rip), %rdi     # 0x3f822
leaq 0x31286(%rip), %rsi     # 0x3f72c
leaq 0x31394(%rip), %rcx     # 0x3f841
movl $0x8d, %edx
callq 0xb180
leaq 0x31364(%rip), %rdi     # 0x3f822
leaq 0x31267(%rip), %rsi     # 0x3f72c
leaq 0x313f3(%rip), %rcx     # 0x3f8bf
movl $0xc5, %edx
callq 0xb180
movq %rax, %rbx
cmpl $0x0, -0x38(%rbp)
je 0xe4ed
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0xe4ed
callq 0xb350
movq %rbx, %rdi
callq 0xb4e0
nop