// File: /workspace/github_cpp_makefile_star2_O2/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 $0xe8, %rsp
movq %rcx, %rbp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r13
leaq 0x18(%rdi), %rbx
leaq 0x30(%rdi), %rax
movq %rax, 0x38(%rsp)
leaq 0x48(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x60(%rdi), %r12
leaq 0x78(%rdi), %rax
movq %rax, 0x30(%rsp)
leaq 0x90(%rdi), %rax
movq %rax, 0x28(%rsp)
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1090
movl %r15d, 0x8(%r13)
movl %r14d, 0x4(%r13)
orl $-0x1, 0x14(%r13)
orq $-0x1, 0xc(%r13)
callq 0x1030
cltd
idivl %r14d
movl %edx, 0xcc(%r13)
callq 0x1030
cltd
idivl %r14d
movl %edx, 0xd0(%r13)
callq 0x1030
cltd
idivl %r14d
movl %edx, 0xa8(%r13)
callq 0x1030
cltd
idivl %r14d
movl %edx, 0xac(%r13)
movslq 0x8(%r13), %rsi
leaq 0x10(%rsp), %rdi
callq 0x18ed
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2fe4
movq %r14, %rdi
callq 0x15ce
leaq 0xd0(%rsp), %rdi
movq %rbx, %rsi
callq 0x2f60
leaq 0x10(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
movq %r13, %rsi
movq 0x38(%rsp), %r15
callq 0x21aa
leaq 0x10(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x2fe4
movq %r14, %rdi
callq 0x15ce
leaq 0xd0(%rsp), %rdi
callq 0x15ce
movq 0x20(%r13), %rsi
subq 0x18(%r13), %rsi
shrq $0x2, %rsi
movl %esi, (%r13)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rdx
callq 0x1b71
leaq 0x10(%rsp), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2fe4
movq %r14, %rdi
callq 0x15ce
movl (%r13), %esi
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rdx
callq 0x1b71
leaq 0x10(%rsp), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x2fe4
movq %r14, %rdi
callq 0x15ce
leaq 0xb8(%rsp), %rdi
movq %rbp, %rsi
callq 0x2f60
movl (%r13), %ecx
leaq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x221c
leaq 0x10(%rsp), %r14
movq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x2fe4
movq %r14, %rdi
callq 0x15ce
leaq 0xb8(%rsp), %rdi
callq 0x15ce
leaq 0xa0(%rsp), %rdi
movq %rbp, %rsi
callq 0x2f60
movl (%r13), %ecx
leaq 0x10(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x221c
leaq 0x10(%rsp), %r14
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x2fe4
movq %r14, %rdi
callq 0x15ce
leaq 0xa0(%rsp), %rdi
callq 0x15ce
movl 0xa8(%r13), %ebp
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0x2f60
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x2f60
leaq 0x88(%rsp), %rdx
leaq 0x70(%rsp), %rcx
movq %r13, %rdi
movl %ebp, %esi
callq 0x2296
movl %eax, 0xb0(%r13)
leaq 0x70(%rsp), %rdi
callq 0x15ce
leaq 0x88(%rsp), %rdi
callq 0x15ce
movl 0xac(%r13), %ebp
leaq 0x58(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2f60
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x2f60
leaq 0x58(%rsp), %rdx
leaq 0x40(%rsp), %rcx
movq %r13, %rdi
movl %ebp, %esi
callq 0x2296
movl %eax, 0xb4(%r13)
leaq 0x40(%rsp), %rdi
callq 0x15ce
leaq 0x58(%rsp), %rdi
callq 0x15ce
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
leaq 0x40(%rsp), %rdi
callq 0x15ce
jmp 0x210b
movq %rax, %r13
leaq 0x58(%rsp), %rdi
jmp 0x215b
movq %rax, %r13
leaq 0x70(%rsp), %rdi
callq 0x15ce
jmp 0x2124
movq %rax, %r13
leaq 0x88(%rsp), %rdi
jmp 0x215b
movq %rax, %r13
leaq 0xa0(%rsp), %rdi
jmp 0x215b
jmp 0x2166
movq %rax, %r13
leaq 0xb8(%rsp), %rdi
jmp 0x215b
jmp 0x2166
jmp 0x2166
jmp 0x2166
movq %rax, %r13
leaq 0xd0(%rsp), %rdi
callq 0x15ce
jmp 0x2169
jmp 0x2166
jmp 0x2166
movq %rax, %r13
movq 0x28(%rsp), %rdi
callq 0x15ce
movq 0x30(%rsp), %rdi
callq 0x15ce
movq %r12, %rdi
callq 0x15ce
movq 0x8(%rsp), %rdi
callq 0x15ce
movq 0x38(%rsp), %rdi
callq 0x15ce
movq %rbx, %rdi
callq 0x15ce
movq %r13, %rdi
callq 0x1160
nop