// File: hdlguy[P]fft_demo/conv.cpp
// Function: main
int main(int argc, char **argv) {
    const int Nsig  = 256;
    const int Nt    =  32;
    const int Off   =   5;
    const int Nfft  =  (int)pow(2.0, ceil(log2(2.0*Nt-1))); // 2^(ceil(log2(2*Nt-1)));
    cout << "Nfft = " << Nfft << "\n";


    // random signal
    vector<double> s_real(Nsig);
    vector<double> s_imag(Nsig);
    for(int i=0; i<Nsig; i++) {
        s_real[i] = ((double)rand())/((double)RAND_MAX) - 0.5;
        s_imag[i] = ((double)rand())/((double)RAND_MAX) - 0.5;
    }

    // take the reverse order complex conjugate of a portion of the signal to be the convolution template.
    vector<double> h_real(Nt);
    vector<double> h_imag(Nt);
    for(int i=0; i<Nt; i++) {
        h_imag[i] = -s_imag[Nt-1-i+Off];
        h_real[i] = +s_real[Nt-1-i+Off];
    }

    vector<double> h_pad_imag(Nfft, 0.0);
    vector<double> h_pad_real(Nfft, 0.0);
    vector<double> s_pad_imag(Nfft, 0.0);
    vector<double> s_pad_real(Nfft, 0.0);
    for(int i=0; i<Nt; i++) {
        h_pad_imag[i] = h_imag[i];
        h_pad_real[i] = h_real[i];
        s_pad_imag[i] = s_imag[i];
        s_pad_real[i] = s_real[i];
    }
    
    vector<double> H_imag(Nfft); H_imag = h_pad_imag;
    vector<double> H_real(Nfft); H_real = h_pad_real;
    Fft::transformRadix2(H_real, H_imag);

    vector<double> S_imag(Nfft); S_imag = s_pad_imag;
    vector<double> S_real(Nfft); S_real = s_pad_real;
    Fft::transformRadix2(S_real, S_imag);

    vector<double> Y_imag(Nfft);
    vector<double> Y_real(Nfft);
    for(int i=0; i<Nfft; i++) {
        Y_imag[i] = (H_real[i]*S_real[i] - H_imag[i]*S_imag[i]);
        Y_real[i] = (H_real[i]*S_imag[i] + H_imag[i]*S_real[i]);
    }

    vector<double> y_imag(Nfft); y_imag = Y_imag;
    vector<double> y_real(Nfft); y_real = Y_real;
    Fft::transformRadix2(y_imag, y_real);  // real <-> imag swapped to implement inverse fft (without scaling)

    // plot time domain data
    FILE* gnuplotPipe = popen ("gnuplot --persist", "w");
    fprintf(gnuplotPipe, "plot '-' ps 0.1 lt 6\n");
    for (int i=0; i<Nfft; i++) fprintf(gnuplotPipe, "%lf\n", h_pad_real[i]);
    fprintf(gnuplotPipe, "e");
    pclose(gnuplotPipe);


    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3d0, %rsp            # imm = 0x3D0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x100, -0x14(%rbp)     # imm = 0x100
movl $0x20, -0x18(%rbp)
movl $0x5, -0x1c(%rbp)
movsd 0x23fa(%rip), %xmm0     # 0x60c0
callq 0x11b0
callq 0x1030
movaps %xmm0, %xmm1
movsd 0x23ed(%rip), %xmm0     # 0x60c8
callq 0x1190
cvttsd2si %xmm0, %eax
movl %eax, -0x20(%rbp)
movq 0x52ea(%rip), %rdi      # 0x8fd8
leaq 0x23e3(%rip), %rsi      # 0x60d8
callq 0x10f0
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x1180
movq %rax, %rdi
leaq 0x23f9(%rip), %rsi      # 0x6108
callq 0x10f0
leaq -0x39(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x2e20
movq -0x268(%rbp), %rdx
leaq -0x38(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2e40
jmp 0x3d3b
leaq -0x39(%rbp), %rdi
callq 0x2eb0
leaq -0x69(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0x2e20
movq -0x270(%rbp), %rdx
leaq -0x68(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2e40
jmp 0x3d6b
leaq -0x69(%rbp), %rdi
callq 0x2eb0
movl $0x0, -0x70(%rbp)
cmpl $0x100, -0x70(%rbp)     # imm = 0x100
jge 0x3e4e
callq 0x1050
cvtsi2sd %eax, %xmm0
movsd 0x2337(%rip), %xmm1     # 0x60d0
divsd %xmm1, %xmm0
movsd 0x230b(%rip), %xmm1     # 0x60b0
subsd %xmm1, %xmm0
movsd %xmm0, -0x280(%rbp)
movslq -0x70(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2ed0
movsd -0x280(%rbp), %xmm0
movsd %xmm0, (%rax)
callq 0x1050
cvtsi2sd %eax, %xmm0
movsd 0x22f5(%rip), %xmm1     # 0x60d0
divsd %xmm1, %xmm0
movsd 0x22c9(%rip), %xmm1     # 0x60b0
subsd %xmm1, %xmm0
movsd %xmm0, -0x278(%rbp)
movslq -0x70(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x2ed0
movsd -0x278(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x3d7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x2eb0
jmp 0x4af9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x2eb0
jmp 0x4af0
leaq -0x89(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0x2e20
movq -0x288(%rbp), %rdx
leaq -0x88(%rbp), %rdi
movl $0x20, %esi
callq 0x2e40
jmp 0x3e7b
leaq -0x89(%rbp), %rdi
callq 0x2eb0
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x2e20
movq -0x290(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
movl $0x20, %esi
callq 0x2e40
jmp 0x3eb4
leaq -0xa9(%rbp), %rdi
callq 0x2eb0
movl $0x0, -0xb0(%rbp)
cmpl $0x20, -0xb0(%rbp)
jge 0x3fc6
movl $0x1f, %eax
subl -0xb0(%rbp), %eax
addl $0x5, %eax
movslq %eax, %rsi
leaq -0x68(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x2a0(%rbp)
movslq -0xb0(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x2ed0
movsd -0x2a0(%rbp), %xmm0
movsd %xmm0, (%rax)
movl $0x1f, %eax
subl -0xb0(%rbp), %eax
addl $0x5, %eax
movslq %eax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x298(%rbp)
movslq -0xb0(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x2ed0
movsd -0x298(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0xb0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb0(%rbp)
jmp 0x3eca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x89(%rbp), %rdi
callq 0x2eb0
jmp 0x4ae7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa9(%rbp), %rdi
callq 0x2eb0
jmp 0x4adb
movslq -0x20(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq $0x0, -0xd0(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x2e20
movq -0x2b0(%rbp), %rsi
movq -0x2a8(%rbp), %rcx
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x4b10
jmp 0x4012
leaq -0xd1(%rbp), %rdi
callq 0x2eb0
movslq -0x20(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movq $0x0, -0xf8(%rbp)
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x2e20
movq -0x2c0(%rbp), %rsi
movq -0x2b8(%rbp), %rcx
leaq -0xf0(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
callq 0x4b10
jmp 0x406a
leaq -0xf9(%rbp), %rdi
callq 0x2eb0
movslq -0x20(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq $0x0, -0x120(%rbp)
leaq -0x121(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x2e20
movq -0x2d0(%rbp), %rsi
movq -0x2c8(%rbp), %rcx
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rdx
callq 0x4b10
jmp 0x40c2
leaq -0x121(%rbp), %rdi
callq 0x2eb0
movslq -0x20(%rbp), %rax
movq %rax, -0x2e0(%rbp)
movq $0x0, -0x148(%rbp)
leaq -0x149(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x2e20
movq -0x2e0(%rbp), %rsi
movq -0x2d8(%rbp), %rcx
leaq -0x140(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0x4b10
jmp 0x411a
leaq -0x149(%rbp), %rdi
callq 0x2eb0
movl $0x0, -0x150(%rbp)
cmpl $0x20, -0x150(%rbp)
jge 0x42b7
movslq -0x150(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x300(%rbp)
movslq -0x150(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x2ed0
movsd -0x300(%rbp), %xmm0
movsd %xmm0, (%rax)
movslq -0x150(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x2f8(%rbp)
movslq -0x150(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x2ed0
movsd -0x2f8(%rbp), %xmm0
movsd %xmm0, (%rax)
movslq -0x150(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x2f0(%rbp)
movslq -0x150(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x2ed0
movsd -0x2f0(%rbp), %xmm0
movsd %xmm0, (%rax)
movslq -0x150(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x2e8(%rbp)
movslq -0x150(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0x2ed0
movsd -0x2e8(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x150(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x150(%rbp)
jmp 0x4130
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd1(%rbp), %rdi
callq 0x2eb0
jmp 0x4acf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf9(%rbp), %rdi
callq 0x2eb0
jmp 0x4ac3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x121(%rbp), %rdi
callq 0x2eb0
jmp 0x4ab7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x149(%rbp), %rdi
callq 0x2eb0
jmp 0x4aab
movslq -0x20(%rbp), %rax
movq %rax, -0x310(%rbp)
leaq -0x169(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x2e20
movq -0x310(%rbp), %rsi
movq -0x308(%rbp), %rdx
leaq -0x168(%rbp), %rdi
callq 0x2e40
jmp 0x42f1
leaq -0x169(%rbp), %rdi
callq 0x2eb0
leaq -0x168(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x4b90
jmp 0x4312
movslq -0x20(%rbp), %rax
movq %rax, -0x320(%rbp)
leaq -0x189(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x2e20
movq -0x320(%rbp), %rsi
movq -0x318(%rbp), %rdx
leaq -0x188(%rbp), %rdi
callq 0x2e40
jmp 0x434c
leaq -0x189(%rbp), %rdi
callq 0x2eb0
leaq -0x188(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x4b90
jmp 0x436d
leaq -0x188(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x13c0
jmp 0x4382
movslq -0x20(%rbp), %rax
movq %rax, -0x330(%rbp)
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x2e20
movq -0x330(%rbp), %rsi
movq -0x328(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x2e40
jmp 0x43bc
leaq -0x1a9(%rbp), %rdi
callq 0x2eb0
leaq -0x1a8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x4b90
jmp 0x43dd
movslq -0x20(%rbp), %rax
movq %rax, -0x340(%rbp)
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x2e20
movq -0x340(%rbp), %rsi
movq -0x338(%rbp), %rdx
leaq -0x1c8(%rbp), %rdi
callq 0x2e40
jmp 0x4417
leaq -0x1c9(%rbp), %rdi
callq 0x2eb0
leaq -0x1c8(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x4b90
jmp 0x4438
leaq -0x1c8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x13c0
jmp 0x444d
movslq -0x20(%rbp), %rax
movq %rax, -0x350(%rbp)
leaq -0x1e9(%rbp), %rdi
movq %rdi, -0x348(%rbp)
callq 0x2e20
movq -0x350(%rbp), %rsi
movq -0x348(%rbp), %rdx
leaq -0x1e8(%rbp), %rdi
callq 0x2e40
jmp 0x4487
leaq -0x1e9(%rbp), %rdi
callq 0x2eb0
movslq -0x20(%rbp), %rax
movq %rax, -0x360(%rbp)
leaq -0x209(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0x2e20
movq -0x360(%rbp), %rsi
movq -0x358(%rbp), %rdx
leaq -0x208(%rbp), %rdi
callq 0x2e40
jmp 0x44cd
leaq -0x209(%rbp), %rdi
callq 0x2eb0
movl $0x0, -0x210(%rbp)
movl -0x210(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x4785
movslq -0x210(%rbp), %rsi
leaq -0x188(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x398(%rbp)
movslq -0x210(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x390(%rbp)
movslq -0x210(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x3a0(%rbp)
movslq -0x210(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x2ed0
movsd -0x3a0(%rbp), %xmm1
movsd -0x398(%rbp), %xmm0
movsd -0x390(%rbp), %xmm2
mulsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x388(%rbp)
movslq -0x210(%rbp), %rsi
leaq -0x1e8(%rbp), %rdi
callq 0x2ed0
movsd -0x388(%rbp), %xmm0
movsd %xmm0, (%rax)
movslq -0x210(%rbp), %rsi
leaq -0x188(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x378(%rbp)
movslq -0x210(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x370(%rbp)
movslq -0x210(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x2ed0
movsd (%rax), %xmm0
movsd %xmm0, -0x380(%rbp)
movslq -0x210(%rbp), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x2ed0
movsd -0x380(%rbp), %xmm1
movsd -0x378(%rbp), %xmm0
movsd -0x370(%rbp), %xmm2
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x368(%rbp)
movslq -0x210(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0x2ed0
movsd -0x368(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x210(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x210(%rbp)
jmp 0x44e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x169(%rbp), %rdi
callq 0x2eb0
jmp 0x4a9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4a93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x189(%rbp), %rdi
callq 0x2eb0
jmp 0x4a93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4a87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1a9(%rbp), %rdi
callq 0x2eb0
jmp 0x4a87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4a7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1c9(%rbp), %rdi
callq 0x2eb0
jmp 0x4a7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4a6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1e9(%rbp), %rdi
callq 0x2eb0
jmp 0x4a6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x209(%rbp), %rdi
callq 0x2eb0
jmp 0x4a63
movslq -0x20(%rbp), %rax
movq %rax, -0x3b0(%rbp)
leaq -0x229(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x2e20
movq -0x3b0(%rbp), %rsi
movq -0x3a8(%rbp), %rdx
leaq -0x228(%rbp), %rdi
callq 0x2e40
jmp 0x47bf
leaq -0x229(%rbp), %rdi
callq 0x2eb0
leaq -0x228(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x4b90
jmp 0x47e0
movslq -0x20(%rbp), %rax
movq %rax, -0x3c0(%rbp)
leaq -0x249(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x2e20
movq -0x3c0(%rbp), %rsi
movq -0x3b8(%rbp), %rdx
leaq -0x248(%rbp), %rdi
callq 0x2e40
jmp 0x481a
leaq -0x249(%rbp), %rdi
callq 0x2eb0
leaq -0x248(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x4b90
jmp 0x483b
leaq -0x228(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x13c0
jmp 0x4850
leaq 0x1889(%rip), %rdi      # 0x60e0
leaq 0x1894(%rip), %rsi      # 0x60f2
callq 0x1070
movq %rax, -0x3c8(%rbp)
jmp 0x486c
movq -0x3c8(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rdi
leaq 0x186c(%rip), %rsi      # 0x60f4
movb $0x0, %al
callq 0x1120
movl $0x0, -0x25c(%rbp)
movl -0x25c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x495b
movq -0x258(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movslq -0x25c(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x2ed0
movq -0x3d0(%rbp), %rdi
movsd (%rax), %xmm0
leaq 0x182f(%rip), %rsi      # 0x610a
movb $0x1, %al
callq 0x1120
movl -0x25c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x25c(%rbp)
jmp 0x4899
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x229(%rbp), %rdi
callq 0x2eb0
jmp 0x4a57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4a4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x249(%rbp), %rdi
callq 0x2eb0
jmp 0x4a4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x2ef0
jmp 0x4a4b
movq -0x258(%rbp), %rdi
leaq 0x1714(%rip), %rsi      # 0x607d
xorl %eax, %eax
callq 0x1120
movq -0x258(%rbp), %rdi
callq 0x1110
jmp 0x497e
movl $0x0, -0x4(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x2ef0
leaq -0x228(%rbp), %rdi
callq 0x2ef0
leaq -0x208(%rbp), %rdi
callq 0x2ef0
leaq -0x1e8(%rbp), %rdi
callq 0x2ef0
leaq -0x1c8(%rbp), %rdi
callq 0x2ef0
leaq -0x1a8(%rbp), %rdi
callq 0x2ef0
leaq -0x188(%rbp), %rdi
callq 0x2ef0
leaq -0x168(%rbp), %rdi
callq 0x2ef0
leaq -0x140(%rbp), %rdi
callq 0x2ef0
leaq -0x118(%rbp), %rdi
callq 0x2ef0
leaq -0xf0(%rbp), %rdi
callq 0x2ef0
leaq -0xc8(%rbp), %rdi
callq 0x2ef0
leaq -0xa8(%rbp), %rdi
callq 0x2ef0
leaq -0x88(%rbp), %rdi
callq 0x2ef0
leaq -0x68(%rbp), %rdi
callq 0x2ef0
leaq -0x38(%rbp), %rdi
callq 0x2ef0
movl -0x4(%rbp), %eax
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbp
retq
leaq -0x228(%rbp), %rdi
callq 0x2ef0
leaq -0x208(%rbp), %rdi
callq 0x2ef0
leaq -0x1e8(%rbp), %rdi
callq 0x2ef0
leaq -0x1c8(%rbp), %rdi
callq 0x2ef0
leaq -0x1a8(%rbp), %rdi
callq 0x2ef0
leaq -0x188(%rbp), %rdi
callq 0x2ef0
leaq -0x168(%rbp), %rdi
callq 0x2ef0
leaq -0x140(%rbp), %rdi
callq 0x2ef0
leaq -0x118(%rbp), %rdi
callq 0x2ef0
leaq -0xf0(%rbp), %rdi
callq 0x2ef0
leaq -0xc8(%rbp), %rdi
callq 0x2ef0
leaq -0xa8(%rbp), %rdi
callq 0x2ef0
leaq -0x88(%rbp), %rdi
callq 0x2ef0
leaq -0x68(%rbp), %rdi
callq 0x2ef0
leaq -0x38(%rbp), %rdi
callq 0x2ef0
movq -0x48(%rbp), %rdi
callq 0x11a0
nopw %cs:(%rax,%rax)
nopl (%rax)