// File: archit-p[P]bulletproofs-demo/src/prover.cpp
// Function: Prover::set_t_coefficients()
bool Prover::set_t_coefficients()
{
    if(x == -1 || z == -1 || y == -1) {
        cout << "Set the x and z values before calling";
        return false;
    }
    vector <int> prod = haderson_product(vector_sum(Prover::ar, k_product_vector(get_k_vector(1, ar.size()), z)), get_k_vector(y, ar.size()));
    prod = vector_sum(prod, k_product_vector(get_k_vector(2, ar.size()), (int)pow(z, 2)));
    vector <int> diff = vector_diff(al, k_product_vector(get_k_vector(1, n), z));
    t[0] = inner_product(prod, diff);
    vector <int> haderson_y = haderson_product(get_k_vector(y, ar.size()), sr);
    t[1] = inner_product(diff, haderson_y) + inner_product(sl, prod);
    t[2] = inner_product(sl, sr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x278(%rbp)
cmpl $-0x1, 0xc(%rax)
je 0x4aaa
movq -0x278(%rbp), %rax
cmpl $-0x1, 0x14(%rax)
je 0x4aaa
movq -0x278(%rbp), %rax
cmpl $-0x1, 0x10(%rax)
jne 0x4aca
movq 0x7527(%rip), %rdi      # 0xbfd8
leaq 0x3573(%rip), %rsi      # 0x802b
callq 0x10c0
xorl %eax, %eax
andb $0x1, %al
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
movq -0x278(%rbp), %rsi
addq $0x30, %rsi
movq %rsi, -0x280(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x52c0
movq -0x280(%rbp), %rdi
callq 0x2450
movl %eax, %edx
leaq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x2950
jmp 0x4b03
movq -0x278(%rbp), %rax
movl 0x14(%rax), %edx
leaq -0x68(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2ac0
jmp 0x4b1c
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x2ce0
jmp 0x4b2f
movq -0x278(%rbp), %rdi
movl 0x10(%rdi), %eax
movl %eax, -0x284(%rbp)
addq $0x30, %rdi
callq 0x2450
movl -0x284(%rbp), %esi
movl %eax, %edx
leaq -0xa8(%rbp), %rdi
callq 0x2950
jmp 0x4b5e
leaq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x1510
jmp 0x4b74
leaq -0xa8(%rbp), %rdi
callq 0x1cc0
leaq -0x38(%rbp), %rdi
callq 0x1cc0
leaq -0x68(%rbp), %rdi
callq 0x1cc0
leaq -0x80(%rbp), %rdi
callq 0x1cc0
leaq -0x50(%rbp), %rdi
callq 0x1cc0
leaq -0xd8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x52c0
jmp 0x4bb6
movq -0x278(%rbp), %rdi
addq $0x30, %rdi
callq 0x2450
movl %eax, %edx
leaq -0x108(%rbp), %rdi
movl $0x2, %esi
callq 0x2950
jmp 0x4bdb
movq -0x278(%rbp), %rax
movl 0x14(%rax), %edi
movl $0x2, %esi
callq 0x3020
movsd %xmm0, -0x290(%rbp)
jmp 0x4bf9
movsd -0x290(%rbp), %xmm0
cvttsd2si %xmm0, %edx
leaq -0xf0(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x2ac0
jmp 0x4c1a
leaq -0xc0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x2ce0
jmp 0x4c36
leaq -0x20(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movq %rsi, -0x298(%rbp)
callq 0x5290
movq -0x298(%rbp), %rdi
callq 0x1cc0
leaq -0xf0(%rbp), %rdi
callq 0x1cc0
leaq -0x108(%rbp), %rdi
callq 0x1cc0
leaq -0xd8(%rbp), %rdi
callq 0x1cc0
movq -0x278(%rbp), %rsi
addq $0x18, %rsi
leaq -0x138(%rbp), %rdi
callq 0x52c0
jmp 0x4c96
movq -0x278(%rbp), %rax
movl (%rax), %edx
leaq -0x168(%rbp), %rdi
movl $0x1, %esi
callq 0x2950
jmp 0x4cb2
movq -0x278(%rbp), %rax
movl 0x14(%rax), %edx
leaq -0x150(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x2ac0
jmp 0x4cd1
leaq -0x120(%rbp), %rdi
leaq -0x138(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x2c00
jmp 0x4ced
leaq -0x150(%rbp), %rdi
callq 0x1cc0
leaq -0x168(%rbp), %rdi
callq 0x1cc0
leaq -0x138(%rbp), %rdi
callq 0x1cc0
leaq -0x180(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x52c0
jmp 0x4d23
leaq -0x198(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x52c0
jmp 0x4d38
leaq -0x180(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x1650
movq %rax, -0x2a0(%rbp)
jmp 0x4d54
movq -0x278(%rbp), %rax
movq -0x2a0(%rbp), %rcx
movl %ecx, 0xb8(%rax)
leaq -0x198(%rbp), %rdi
callq 0x1cc0
leaq -0x180(%rbp), %rdi
callq 0x1cc0
movq -0x278(%rbp), %rdi
movl 0x10(%rdi), %eax
movl %eax, -0x2a4(%rbp)
addq $0x30, %rdi
callq 0x2450
movl -0x2a4(%rbp), %esi
movl %eax, %edx
leaq -0x1c8(%rbp), %rdi
callq 0x2950
jmp 0x4daf
movq -0x278(%rbp), %rsi
addq $0x60, %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x52c0
jmp 0x4dc8
leaq -0x1b0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
callq 0x1510
jmp 0x4de4
leaq -0x1e0(%rbp), %rdi
callq 0x1cc0
leaq -0x1c8(%rbp), %rdi
callq 0x1cc0
leaq -0x1f8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x52c0
jmp 0x4e11
leaq -0x210(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x52c0
jmp 0x4e26
leaq -0x1f8(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x1650
movq %rax, -0x2b0(%rbp)
jmp 0x4e42
movq -0x278(%rbp), %rsi
addq $0x48, %rsi
leaq -0x228(%rbp), %rdi
callq 0x52c0
jmp 0x4e5b
leaq -0x240(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x52c0
jmp 0x4e6d
leaq -0x228(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x1650
movq %rax, -0x2b8(%rbp)
jmp 0x4e89
movq -0x278(%rbp), %rax
movq -0x2b0(%rbp), %rcx
movq -0x2b8(%rbp), %rdx
addl %edx, %ecx
movl %ecx, 0xbc(%rax)
leaq -0x240(%rbp), %rdi
callq 0x1cc0
leaq -0x228(%rbp), %rdi
callq 0x1cc0
leaq -0x210(%rbp), %rdi
callq 0x1cc0
leaq -0x1f8(%rbp), %rdi
callq 0x1cc0
movq -0x278(%rbp), %rsi
addq $0x48, %rsi
leaq -0x258(%rbp), %rdi
callq 0x52c0
jmp 0x4eef
movq -0x278(%rbp), %rsi
addq $0x60, %rsi
leaq -0x270(%rbp), %rdi
callq 0x52c0
jmp 0x4f08
leaq -0x258(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x1650
movq %rax, -0x2c0(%rbp)
jmp 0x4f24
movq -0x278(%rbp), %rax
movq -0x2c0(%rbp), %rcx
movl %ecx, 0xc0(%rax)
leaq -0x270(%rbp), %rdi
callq 0x1cc0
leaq -0x258(%rbp), %rdi
callq 0x1cc0
ud2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x4fdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x4fd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x4fc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x4fc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x1cc0
leaq -0x38(%rbp), %rdi
callq 0x1cc0
leaq -0x68(%rbp), %rdi
callq 0x1cc0
leaq -0x80(%rbp), %rdi
callq 0x1cc0
leaq -0x50(%rbp), %rdi
callq 0x1cc0
jmp 0x5259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x5250
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x5052
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x5046
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x1cc0
leaq -0x108(%rbp), %rdi
callq 0x1cc0
leaq -0xd8(%rbp), %rdi
callq 0x1cc0
jmp 0x5250
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x50b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x50a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x1cc0
leaq -0x168(%rbp), %rdi
callq 0x1cc0
leaq -0x138(%rbp), %rdi
callq 0x1cc0
jmp 0x5250
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x5244
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x510f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x1cc0
leaq -0x180(%rbp), %rdi
callq 0x1cc0
jmp 0x5244
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x5152
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x1cc0
leaq -0x1c8(%rbp), %rdi
callq 0x1cc0
jmp 0x5244
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x5238
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x51ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x51e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x51d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x1cc0
leaq -0x228(%rbp), %rdi
callq 0x1cc0
leaq -0x210(%rbp), %rdi
callq 0x1cc0
leaq -0x1f8(%rbp), %rdi
callq 0x1cc0
jmp 0x5238
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x522c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x1cc0
leaq -0x258(%rbp), %rdi
callq 0x1cc0
leaq -0x1b0(%rbp), %rdi
callq 0x1cc0
leaq -0x120(%rbp), %rdi
callq 0x1cc0
leaq -0x20(%rbp), %rdi
callq 0x1cc0
movq -0x88(%rbp), %rdi
callq 0x1170
nopw %cs:(%rax,%rax)