// File: /workspace/github_cpp_makefile_star2_O3/archit-p[P]bulletproofs-demo/src/prover.cpp
// Function: Prover::Prover(int, int, std::vector<int, std::allocator<int>>)
Prover::Prover(int val, int prime, vector <int> gens)
{
    v = val;
    p = prime;
    x = y = z = -1;
    tau[0] = rand()%prime;
    tau[1] = rand()%prime;
    alpha = rand()%prime;
    row = rand()%prime;

    al = get_bit_vector(v);
    ar = get_complement_vector(al);
    n = al.size();

    sl = random_vector(n, 2);
    sr = random_vector(n, 2);

    g = get_gen_vector(gens, n);
    h = get_gen_vector(gens, n);

    a_commit = commit_to(alpha, al, ar);
    s_commit = commit_to(row, sl, sr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rcx, %rbp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
leaq 0x30(%rdi), %rax
movq %rax, 0x28(%rsp)
leaq 0x48(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0x60(%rdi), %r13
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1070
movl %r12d, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movl $0xffffffff, 0x14(%rbx) # imm = 0xFFFFFFFF
movq $-0x1, 0xc(%rbx)
callq 0x1040
cltd
idivl %r15d
movl %edx, 0xcc(%rbx)
callq 0x1040
cltd
idivl %r15d
movl %edx, 0xd0(%rbx)
callq 0x1040
cltd
idivl %r15d
movl %edx, 0xa8(%rbx)
callq 0x1040
cltd
idivl %r15d
movl %edx, 0xac(%rbx)
movslq 0x8(%rbx), %rsi
movq %rsp, %rdi
callq 0x1ad1
movq 0x18(%rbx), %rdi
movq 0x28(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x227d
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x227d
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x3bb8
movq %rsp, %rdi
leaq 0xc0(%rsp), %rdx
movq %rbx, %rsi
callq 0x2742
movq 0x30(%rbx), %rdi
movq 0x40(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x30(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x22ec
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x22ec
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x2309
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x20(%rbx), %rsi
subq 0x18(%rbx), %rsi
shrq $0x2, %rsi
movl %esi, (%rbx)
movq %rsp, %rdi
movl $0x2, %edx
callq 0x1e65
movq 0x48(%rbx), %rdi
movq 0x58(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x48(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x58(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x2370
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2370
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movl (%rbx), %esi
movq %rsp, %rdi
movl $0x2, %edx
callq 0x1e65
movq 0x60(%rbx), %rdi
movq 0x70(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x60(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x23cb
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x23cb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
leaq 0xa8(%rsp), %rdi
movq %rbp, %rsi
callq 0x3bb8
movl (%rbx), %ecx
movq %rsp, %rdi
leaq 0xa8(%rsp), %rdx
callq 0x27dc
movq 0x78(%rbx), %rdi
movq 0x88(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x78(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x88(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x243f
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x243f
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x245c
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
leaq 0x90(%rsp), %rdi
movq %rbp, %rsi
callq 0x3bb8
movl (%rbx), %ecx
movq %rsp, %rdi
leaq 0x90(%rsp), %rdx
callq 0x27dc
movq 0x90(%rbx), %rdi
movq 0xa0(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, 0x90(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0xa0(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x24d6
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x24d6
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x24f3
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movl 0xa8(%rbx), %ebp
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x3bb8
leaq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x3bb8
leaq 0x78(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2876
movl %eax, 0xb0(%rbx)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x2546
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x2560
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movl 0xac(%rbx), %ebp
leaq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3bb8
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x3bb8
leaq 0x48(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2876
movl %eax, 0xb4(%rbx)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x25b3
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x25ca
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x25fb
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x25fb
movq %rax, %rbp
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x26ab
movq 0x58(%rsp), %rsi
jmp 0x269a
movq %rax, %rbp
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x2632
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2632
movq %rax, %rbp
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x26ab
movq 0x88(%rsp), %rsi
jmp 0x269a
movq %rax, %rbp
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x26ab
movq 0xa0(%rsp), %rsi
jmp 0x269a
jmp 0x26a8
movq %rax, %rbp
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x26ab
movq 0xb8(%rsp), %rsi
jmp 0x269a
jmp 0x26a8
jmp 0x26a8
jmp 0x26a8
movq %rax, %rbp
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x26ab
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x26ab
jmp 0x26a8
jmp 0x26a8
movq %rax, %rbp
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x26c6
movq 0xa0(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x26de
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq (%r13), %rdi
testq %rdi, %rdi
je 0x26f3
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x270c
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x28(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2725
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2739
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %rbp, %rdi
callq 0x1170
nop