// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
leaq 0x30(%rdi), %rax
movq %rax, 0x38(%rsp)
leaq 0x48(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0x60(%rdi), %r13
leaq 0x78(%rdi), %rax
movq %rax, 0x30(%rsp)
leaq 0x90(%rdi), %rax
movq %rax, 0x28(%rsp)
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
leaq 0x8(%rsp), %rdi
callq 0x1af1
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b48
movq (%r15), %rdi
testq %rdi, %rdi
je 0x2271
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
leaq 0xd0(%rsp), %rdi
movq %r14, %rsi
movq 0x38(%rsp), %r12
callq 0x3a82
leaq 0x8(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
movq %rbx, %rsi
callq 0x268a
leaq 0x8(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x3b48
movq (%r15), %rdi
testq %rdi, %rdi
je 0x22c0
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x22dd
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x20(%rbx), %rsi
subq 0x18(%rbx), %rsi
shrq $0x2, %rsi
movl %esi, (%rbx)
leaq 0x8(%rsp), %rdi
movl $0x2, %edx
callq 0x1e6f
leaq 0x8(%rsp), %r15
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x3b48
movq (%r15), %rdi
testq %rdi, %rdi
je 0x2321
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movl (%rbx), %esi
leaq 0x8(%rsp), %rdi
movl $0x2, %edx
callq 0x1e6f
leaq 0x8(%rsp), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x3b48
movq (%r15), %rdi
testq %rdi, %rdi
je 0x2357
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
leaq 0xb8(%rsp), %rdi
movq %rbp, %rsi
callq 0x3a82
movl (%rbx), %ecx
leaq 0x8(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x2724
leaq 0x8(%rsp), %r15
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x3b48
movq (%r15), %rdi
testq %rdi, %rdi
je 0x23a2
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x23bf
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
leaq 0xa0(%rsp), %rdi
movq %rbp, %rsi
callq 0x3a82
movl (%rbx), %ecx
leaq 0x8(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x2724
leaq 0x8(%rsp), %r15
movq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x3b48
movq (%r15), %rdi
testq %rdi, %rdi
je 0x240a
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x2427
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movl 0xa8(%rbx), %ebp
leaq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x3a82
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0x3a82
leaq 0x88(%rsp), %rdx
leaq 0x70(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x27be
movl %eax, 0xb0(%rbx)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x2481
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x249e
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movl 0xac(%rbx), %ebp
leaq 0x58(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3a82
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x3a82
leaq 0x58(%rsp), %rdx
leaq 0x40(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x27be
movl %eax, 0xb4(%rbx)
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x24f1
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x2508
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x2539
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2539
movq %rax, %rbp
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x25ef
movq 0x68(%rsp), %rsi
jmp 0x25de
movq %rax, %rbp
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x2573
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x2573
movq %rax, %rbp
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x25ef
movq 0x98(%rsp), %rsi
jmp 0x25de
movq %rax, %rbp
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x25ef
movq 0xb0(%rsp), %rsi
jmp 0x25de
jmp 0x25ec
movq %rax, %rbp
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x25ef
movq 0xc8(%rsp), %rsi
jmp 0x25de
jmp 0x25ec
jmp 0x25ec
jmp 0x25ec
movq %rax, %rbp
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x25ef
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x25ef
jmp 0x25ec
jmp 0x25ec
movq %rax, %rbp
movq 0x28(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x260b
movq 0xa0(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x30(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2627
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq (%r13), %rdi
testq %rdi, %rdi
je 0x263c
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2655
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x38(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x266e
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2682
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %rbp, %rdi
callq 0x1170