LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/OpenFirework[P]MyJPEG_Decoder/./jpeg/jpeg_decoder.cpp
// Function: createhuftable(int*, unsigned char*, int, std::vector<hufcode, std::allocator<hufcode>>&)
void createhuftable(int tree[16], byte *value, int length, std::vector<hufcode> &OUTT) {
    int comlength = 0;
    for (int i = 0; i<16; i++) {
        comlength += tree[i];
    }
    if (comlength != length) {
        std::cout << "data error, length not match\n";
    }
    int left = 0;
    int right = 0;
    int index = 0;
    int last_depth = 0;

    for (int i = 0; i<16; i++) {
        int nums = tree[i];
        if (index != 0) {
            int mul = pow(2, i + 1 - last_depth);
            left = (right + 1)*mul;
        }
        else {
            left = 0;
        }
        if (nums != 0) {
            last_depth = i + 1;
            int cur_value = left;
            for (int j = 0; j<nums; j++) {
                hufcode unit;
                unit.codeLength = i+1;
                unit.encodeValue = cur_value++;
                unit.realVale = value[index++];
                OUTT.push_back(unit);
            }
            right = cur_value - 1;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rsi, -0x58(%rbp)
movq %rdi, %r13
xorl %eax, %eax
xorl %ecx, %ecx
addl (%r13,%rax,4), %ecx
incq %rax
cmpq $0x10, %rax
jne 0x2bed
cmpl %edx, %ecx
je 0x2c17
movq 0x53ca(%rip), %rdi      # 0x7fd0
leaq 0x267e(%rip), %rsi      # 0x528b
movl $0x1d, %edx
callq 0x2130
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %eax, %eax
xorl %esi, %esi
movq %r13, -0x50(%rbp)
movl (%r13,%r15,4), %edi
movl $0x0, %edx
testl %eax, %eax
movq %rdi, -0x48(%rbp)
movl %eax, -0x2c(%rbp)
je 0x2c6c
movl %r15d, %edi
subl %r12d, %edi
incl %edi
movsd 0x23ce(%rip), %xmm0     # 0x5018
movq %r12, %r14
movq %rsi, %r12
callq 0x21a0
movq %r12, %rsi
movq -0x48(%rbp), %rdi
movq %r14, %r12
cvttsd2si %xmm0, %eax
leal 0x1(%rsi), %edx
imull %eax, %edx
movl -0x2c(%rbp), %eax
testq %rdi, %rdi
je 0x2ced
leaq 0x1(%r15), %r12
testl %edi, %edi
jle 0x2ce9
movq %r15, -0x60(%rbp)
movslq %eax, %r14
addq -0x58(%rbp), %r14
movl %edx, -0x30(%rbp)
movl %edx, %r15d
xorl %r13d, %r13d
leal (%r15,%r13), %eax
movl %r12d, -0x3c(%rbp)
movl %eax, -0x38(%rbp)
movb (%r14,%r13), %al
movb %al, -0x34(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2cbd
movl -0x34(%rbp), %eax
movl %eax, 0x8(%rsi)
movq -0x3c(%rbp), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rbx)
jmp 0x2ccd
movq %rbx, %rdi
leaq -0x3c(%rbp), %rdx
callq 0x34fe
movq -0x48(%rbp), %rdi
incq %r13
cmpl %r13d, %edi
jne 0x2c8d
movl -0x2c(%rbp), %eax
addl %r13d, %eax
movl -0x30(%rbp), %edx
addl %r13d, %edx
movq -0x50(%rbp), %r13
movq -0x60(%rbp), %r15
decl %edx
movl %edx, %esi
incq %r15
cmpq $0x10, %r15
jne 0x2c25
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/OpenFirework[P]MyJPEG_Decoder/./jpeg/jpeg_decoder.cpp
// Function: getBit(unsigned char*&)
bool getBit(byte *&framedata) {
    static unsigned char buf;
    static unsigned char count = 0;
    if (count == 0) {
        memcpy(&buf, framedata++, 1);
        if (buf == 0xFF) {
            unsigned char check;
            memcpy(&check, framedata++, 1);
            if (check != 0x00) {
                fprintf(stderr, "data 段有不是 0xFF00 的数据\n");
            }
        }
    }
    bool ret = buf & (1 << (7 - count));
    count = (count == 7 ? 0 : count + 1);
    return ret;
}

// Assembly:
cmpb $0x0, 0x6399(%rip)      # 0x90a9
jne 0x2d36
movq (%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rdi)
movb (%rax), %cl
movb %cl, 0x6384(%rip)       # 0x90a8
cmpb $-0x1, %cl
jne 0x2d36
leaq 0x2(%rax), %rcx
movq %rcx, (%rdi)
cmpb $0x0, 0x1(%rax)
jne 0x2d63
movzbl 0x636b(%rip), %eax      # 0x90a8
movb 0x6366(%rip), %cl       # 0x90a9
leal 0x1(%rcx), %edx
xorl %esi, %esi
subb $0x7, %cl
movzbl %dl, %edx
cmovel %esi, %edx
negb %cl
movzbl %cl, %ecx
btl %ecx, %eax
setb %al
movb %dl, 0x6347(%rip)       # 0x90a9
retq
pushq %rbp
movq %rsp, %rbp
callq 0x230c
popq %rbp
jmp 0x2d36
// File: /workspace/github_cpp_makefile_star2_O1/OpenFirework[P]MyJPEG_Decoder/./jpeg/jpeg_decoder.cpp
// Function: MCU::toRGB()
RGB **toRGB() {
        RGB **ret = new RGB *[maxHeight*8];
        for (int i = 0; i < maxHeight*8; i++) { 
            ret[i] = new RGB[maxWidth*8];
        }

        for (int i = 0; i < maxHeight * 8; i++) {
            for (int j = 0; j < maxWidth * 8; j++) {
                double Y = trans(1, i, j);
                double Cb = trans(2, i, j);
                double Cr = trans(3, i, j);
                ret[i][j].R = chomp(Y + 1.402*Cr + 128);
                ret[i][j].G = chomp(Y - 0.34414*Cb - 0.71414*Cr + 128);
                ret[i][j].B = chomp(Y + 1.772*Cb + 128);
            }
        }
        return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movzbl 0x5506(%rip), %r12d     # 0x8831
movl %r12d, %edi
shll $0x6, %edi
callq 0x2030
movq %rax, %rbx
testl %r12d, %r12d
je 0x3368
movzbl 0x54eb(%rip), %eax      # 0x8830
shll $0x3, %eax
leaq (%rax,%rax,2), %r15
shll $0x6, %r12d
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x2030
movq %rax, (%rbx,%r13)
addq $0x8, %r13
cmpq %r13, %r12
jne 0x3353
cmpb $0x0, 0x54c2(%rip)      # 0x8831
je 0x34bb
movsd 0x800(%r14), %xmm3
movsd 0x1000(%r14), %xmm0
movsd 0x1800(%r14), %xmm1
movsd 0x1c88(%rip), %xmm2     # 0x5020
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
movsd 0x1c80(%rip), %xmm4     # 0x5028
addsd %xmm4, %xmm2
cvttsd2si %xmm2, %esi
movsd 0x1c78(%rip), %xmm5     # 0x5030
mulsd %xmm0, %xmm5
addsd %xmm3, %xmm5
mulsd 0x1c70(%rip), %xmm1     # 0x5038
addsd %xmm5, %xmm1
addsd %xmm4, %xmm1
cvttsd2si %xmm1, %edx
mulsd 0x1c64(%rip), %xmm0     # 0x5040
addsd %xmm3, %xmm0
addsd %xmm4, %xmm0
cvttsd2si %xmm0, %ecx
xorl %eax, %eax
movsd 0x1c56(%rip), %xmm3     # 0x5048
xorpd %xmm4, %xmm4
movzbl %cl, %ecx
movzbl %dl, %edx
movzbl %sil, %esi
cmpb $0x0, 0x5429(%rip)      # 0x8830
je 0x34a5
movq (%rbx,%rax,8), %rdi
addq $0x2, %rdi
xorl %r8d, %r8d
ucomisd %xmm3, %xmm0
seta %r9b
negb %r9b
ucomisd %xmm0, %xmm4
movzbl %r9b, %r10d
movl %ecx, %r9d
cmoval %r10d, %r9d
ucomisd %xmm3, %xmm0
cmoval %r10d, %r9d
ucomisd %xmm3, %xmm1
seta %r10b
negb %r10b
ucomisd %xmm1, %xmm4
movzbl %r10b, %r10d
movl %edx, %r11d
cmoval %r10d, %r11d
ucomisd %xmm3, %xmm1
cmoval %r10d, %r11d
ucomisd %xmm3, %xmm2
seta %r10b
negb %r10b
ucomisd %xmm2, %xmm4
movzbl %r10b, %r10d
movl %esi, %r14d
cmoval %r10d, %r14d
ucomisd %xmm3, %xmm2
cmoval %r10d, %r14d
movb %r14b, -0x2(%rdi)
movb %r11b, -0x1(%rdi)
movb %r9b, (%rdi)
incq %r8
movzbl 0x539c(%rip), %r9d      # 0x8830
shll $0x3, %r9d
addq $0x3, %rdi
cmpq %r9, %r8
jb 0x3418
incq %rax
movzbl 0x5382(%rip), %edi      # 0x8831
shll $0x3, %edi
cmpq %rdi, %rax
jb 0x3400
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/OpenFirework[P]MyJPEG_Decoder/./bmp/bmp_code.cpp
// Function: MyBMP::BMP::showBmpHead(tagBITMAPFILEHEADER)
void MyBMP::BMP::showBmpHead(BITMAPFILEHEADER pBmpHead) {
    printf("BMP文件大小：%dkb\n", pBmpHead.bfSize/1024);
    printf("保留字必须为0：%d\n",  pBmpHead.bfReserved1);
    printf("保留字必须为0：%d\n",  pBmpHead.bfReserved2);
    printf("实际位图数据的偏移字节数: %d\n",  pBmpHead.bfOffBits);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %r14d, %r15d
shrl $0x10, %r15d
movq %rdx, %rbx
shrq $0x20, %rbx
shrq $0x2a, %rsi
leaq 0x19d5(%rip), %rdi      # 0x5333
xorl %eax, %eax
callq 0x2040
movzwl %r14w, %esi
leaq 0x19db(%rip), %r14      # 0x534b
movq %r14, %rdi
xorl %eax, %eax
callq 0x2040
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x2040
leaq 0x19d7(%rip), %rdi      # 0x5365
movl %ebx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2040
nop
// File: /workspace/github_cpp_makefile_star2_O1/OpenFirework[P]MyJPEG_Decoder/./bmp/bmp_code.cpp
// Function: MyBMP::BMP::showBmpInfoHead(tagBITMAPINFOHEADER)
void MyBMP::BMP::showBmpInfoHead(BITMAPINFOHEADER pBmpinfoHead)
{
    //定义显示信息的函数，传入的是信息头结构体
    printf("位图信息头:\n" );
    printf("信息头的大小:%d\n" ,pBmpinfoHead.biSize);
    printf("位图宽度:%d\n" ,pBmpinfoHead.biWidth);
    printf("位图高度:%d\n" ,pBmpinfoHead.biHeight);
    printf("图像的位面数(位面数是调色板的数量,默认为1个调色板):%d\n" ,pBmpinfoHead.biPlanes);
    printf("每个像素的位数:%d\n" ,pBmpinfoHead.biBitCount);
    printf("压缩方式:%d\n" ,pBmpinfoHead.biCompression);
    printf("图像的大小:%d\n" ,pBmpinfoHead.biSizeImage);
    printf("水平方向分辨率:%d\n" ,pBmpinfoHead.biXPelsPerMeter);
    printf("垂直方向分辨率:%d\n" ,pBmpinfoHead.biYPelsPerMeter);
    printf("使用的颜色数:%d\n" ,pBmpinfoHead.biClrUsed);
    printf("重要颜色数:%d\n" ,pBmpinfoHead.biClrImportant);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1b95(%rip), %rdi      # 0x5542
callq 0x21c0
movl 0x10(%rbp), %esi
leaq 0x19d3(%rip), %rdi      # 0x538f
xorl %eax, %eax
callq 0x2040
movl 0x14(%rbp), %esi
leaq 0x19d9(%rip), %rdi      # 0x53a6
xorl %eax, %eax
callq 0x2040
movl 0x18(%rbp), %esi
leaq 0x19d9(%rip), %rdi      # 0x53b7
xorl %eax, %eax
callq 0x2040
movzwl 0x1c(%rbp), %esi
leaq 0x19d8(%rip), %rdi      # 0x53c8
xorl %eax, %eax
callq 0x2040
movzwl 0x1e(%rbp), %esi
leaq 0x1a14(%rip), %rdi      # 0x5416
xorl %eax, %eax
callq 0x2040
movl 0x20(%rbp), %esi
leaq 0x1a1d(%rip), %rdi      # 0x5430
xorl %eax, %eax
callq 0x2040
movl 0x24(%rbp), %esi
leaq 0x1a1d(%rip), %rdi      # 0x5441
xorl %eax, %eax
callq 0x2040
movl 0x28(%rbp), %esi
leaq 0x1a20(%rip), %rdi      # 0x5455
xorl %eax, %eax
callq 0x2040
movl 0x2c(%rbp), %esi
leaq 0x1a29(%rip), %rdi      # 0x546f
xorl %eax, %eax
callq 0x2040
movl 0x30(%rbp), %esi
leaq 0x1a32(%rip), %rdi      # 0x5489
xorl %eax, %eax
callq 0x2040
movl 0x34(%rbp), %esi
leaq 0x1a38(%rip), %rdi      # 0x54a0
xorl %eax, %eax
popq %rbp
jmp 0x2040
// File: /workspace/github_cpp_makefile_star2_O1/rfotino[P]consolite-assembler/src/asm.cpp
// Function: main
int main(int argc, char **argv) {
  if (3 != argc) {
    usage(argv[0]);
    return 1;
  }

  Tokenizer tokenizer(argv[1]);
  Parser parser(&tokenizer, argv[2]);
  if (!parser.firstPass() || !parser.secondPass()) {
    remove(argv[2]);
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x3f95
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3ffa
leaq 0x278(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x429c
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3edd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0x4038
leaq 0x8(%rsp), %rdi
callq 0x622a
testb %al, %al
je 0x3f11
leaq 0x8(%rsp), %rdi
callq 0x6b3a
xorl %ebp, %ebp
testb %al, %al
jne 0x3f1f
movq 0x10(%rbx), %rdi
callq 0x22b0
movl $0x1, %ebp
movq 0x70a2(%rip), %rax      # 0xafc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x80(%rsp), %rbx
movq %rcx, -0x8(%rbx)
movq -0x18(%rcx), %rcx
movq %rax, 0x78(%rsp,%rcx)
movq %rbx, %rdi
callq 0x2160
leaq 0x170(%rsp), %rdi
callq 0x2090
movq -0x28(%rbx), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x3f72
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x40(%rsp), %rdi
callq 0x412c
leaq 0x10(%rsp), %rdi
callq 0x4192
leaq 0x278(%rsp), %rdi
callq 0x2060
jmp 0x3fa2
movq (%rbx), %rdi
callq 0x3dec
movl $0x1, %ebp
movl %ebp, %eax
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %rbp
retq
movq %rax, %rbx
jmp 0x3fe5
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ff2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x3ff2
movq %rax, %rbx
jmp 0x3ff2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x40ca
leaq 0x278(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/rfotino[P]consolite-assembler/src/tokenizer.cpp
// Function: Tokenizer::_getHexVal(char const&)
char Tokenizer::_getHexVal(const char& c) {
  if ('0' <= c && c <= '9') {
    return c - '0';
  } else if ('a' <= c && c <= 'f') {
    return 10 + c - 'a';
  } else if ('A' <= c && c <= 'F') {
    return 10 + c - 'A';
  } else {
    return -1;
  }
}

// Assembly:
movb (%rsi), %cl
leal -0x30(%rcx), %eax
cmpb $0x9, %al
jbe 0x4453
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x4454
addb $-0x57, %cl
movl %ecx, %eax
retq
leal -0x41(%rcx), %eax
addb $-0x37, %cl
cmpb $0x6, %al
movzbl %cl, %ecx
movl $0xff, %eax
cmovbl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/rfotino[P]consolite-assembler/src/tokenizer.cpp
// Function: Tokenizer::_getData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Tokenizer::_getData(const std::string& text, std::string& data) {
  size_t i;
  if (text.size() & 1) {
    data.push_back(_getHexVal(text[2]));
    i = 3;
  } else {
    data.push_back((_getHexVal(text[2]) << 4) | _getHexVal(text[3]));
    i = 4;
  }
  for (; i < text.size(); i += 2) {
    data.push_back((_getHexVal(text[i]) << 4) | _getHexVal(text[i+1]));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rdx
movb 0x2(%rdx), %cl
leal -0x30(%rcx), %eax
testb $0x1, 0x8(%rsi)
jne 0x4496
cmpb $0xa, %al
jb 0x44c1
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x44ae
addb $-0x57, %cl
movl %ecx, %eax
jmp 0x44c1
movl $0x3, %r15d
cmpb $0xa, %al
jb 0x4511
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x44de
addb $-0x57, %cl
movl %ecx, %eax
jmp 0x4511
leal -0x41(%rcx), %eax
addb $-0x37, %cl
cmpb $0x6, %al
movzbl %cl, %ecx
movl $0xff, %eax
cmovbl %ecx, %eax
shlb $0x4, %al
movb 0x3(%rdx), %cl
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
jb 0x4507
leal -0x61(%rcx), %edx
cmpb $0x5, %dl
ja 0x44f3
addb $-0x57, %cl
movl %ecx, %edx
jmp 0x4507
leal -0x41(%rcx), %eax
addb $-0x37, %cl
cmpb $0x6, %al
movzbl %cl, %ecx
movl $0xff, %eax
cmovbl %ecx, %eax
jmp 0x4511
leal -0x41(%rcx), %edx
addb $-0x37, %cl
cmpb $0x6, %dl
movzbl %cl, %ecx
movl $0xff, %edx
cmovbl %ecx, %edx
orb %al, %dl
movl $0x4, %r15d
movl %edx, %eax
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2170
cmpq 0x8(%r14), %r15
jae 0x4596
movl $0xff, %ebp
movq (%r14), %rcx
movb (%rcx,%r15), %dl
leal -0x30(%rdx), %eax
cmpb $0xa, %al
jb 0x4551
leal -0x61(%rdx), %eax
cmpb $0x5, %al
ja 0x4543
addb $-0x57, %dl
movl %edx, %eax
jmp 0x4551
leal -0x41(%rdx), %eax
addb $-0x37, %dl
cmpb $0x6, %al
movzbl %dl, %eax
cmovael %ebp, %eax
movb 0x1(%rcx,%r15), %cl
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
jb 0x457c
leal -0x61(%rcx), %edx
cmpb $0x5, %dl
ja 0x456d
addb $-0x57, %cl
movl %ecx, %edx
jmp 0x457c
leal -0x41(%rcx), %edx
addb $-0x37, %cl
cmpb $0x6, %dl
movzbl %cl, %edx
cmovael %ebp, %edx
shlb $0x4, %al
orb %dl, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2170
addq $0x2, %r15
cmpq 0x8(%r14), %r15
jb 0x4527
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jasmeet13n[P]HTTP-Proxy-Server-Client/proxy.cpp
// Function: get_msg_type(char*)
uint8_t get_msg_type(char *packet){	// extract 7 bit type of message from packet
	uint8_t type;
	type = (unsigned char)packet[1];
	type &= 0x7F;
	return type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x1(%rdi), %al
andb $0x7f, %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jasmeet13n[P]HTTP-Proxy-Server-Client/proxy.cpp
// Function: unpacki32(char*)
unsigned long unpacki32(char *buf){	//change  network byte order to the host order (32bit)
	unsigned long i;
	memcpy(&i,buf,2);
	i = ntohl(i);
	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %eax
bswapl %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jasmeet13n[P]HTTP-Proxy-Server-Client/proxy.cpp
// Function: bringToFront(int)
void bringToFront(int block){
	if(cache[block].last==1)
		return;
	//cout << "Bringing to Front " << block << endl;
	cache[block].last = 1;
	for(int i=0; i<SIZE; i++){
		if(i!=block){
			cache[i].last++;
			if(cache[i].last>SIZE)
				cache[i].last = SIZE;
		}
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %edi, %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
leaq 0x79f5(%rip), %rax      # 0xb460
cmpl $0x1, (%rcx,%rax)
je 0x3aaf
addq %rax, %rcx
movl $0x1, (%rcx)
movl %edi, %ecx
shlq $0x4, %rcx
leaq (%rcx,%rcx,4), %rcx
xorl %edx, %edx
movl $0xa, %esi
cmpq %rdx, %rcx
je 0x3aa2
movl (%rdx,%rax), %edi
leal 0x1(%rdi), %r8d
cmpl $0xa, %edi
cmovgel %esi, %r8d
movl %r8d, (%rdx,%rax)
addq $0x50, %rdx
cmpq $0x320, %rdx            # imm = 0x320
jne 0x3a8b
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jasmeet13n[P]HTTP-Proxy-Server-Client/proxy.cpp
// Function: getFreeBlock()
int getFreeBlock(){
	int end = SIZE;
	int ans = -1;
	//for(int i=0; i<SIZE; i++)
	//	cout << cache[i].last << ",";
	//cout << endl;
	while(end>0){
		for(int i=0; i<SIZE; i++){
			if(cache[i].last==end && cache[i].inUse==0){
				ans = i;
				cache[ans].inUse=-2;
				//cache[ans].last=1;
				//cout << "Ans: "<< ans << endl;
				end=0;
				break;
			}
		}
		end--;
	}
	return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xa, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0x799e(%rip), %rcx      # 0xb464
movq %rcx, %rdi
xorl %esi, %esi
cmpl %edx, -0x4(%rdi)
jne 0x3ad5
cmpl $0x0, (%rdi)
je 0x3ae6
incq %rsi
addq $0x50, %rdi
cmpq $0xa, %rsi
jne 0x3acb
decl %edx
jmp 0x3af3
movl $0xfffffffe, (%rdi)     # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %esi, %eax
testl %edx, %edx
jg 0x3ac6
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jasmeet13n[P]HTTP-Proxy-Server-Client/proxy.cpp
// Function: checkCache(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int checkCache(string host_file){
	if(whichBlock.find(host_file)==whichBlock.end()){
		return -1;
	}
	int cb = whichBlock[host_file];
	if(cache[cb].host_file == host_file)
		return cb;
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x78c3(%rip), %rdi      # 0xb3d0
movq %r14, %rsi
callq 0x6ece
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x78b7(%rip), %rcx      # 0xb3d8
cmpq %rcx, %rax
je 0x3b77
leaq 0x78a3(%rip), %rdi      # 0xb3d0
movq %r14, %rsi
callq 0x68fe
movslq (%rax), %r15
leaq (%r15,%r15,4), %rax
shlq $0x4, %rax
leaq 0x7919(%rip), %rcx      # 0xb460
movq 0x38(%rax,%rcx), %rdx
cmpq 0x8(%r14), %rdx
jne 0x3b77
testq %rdx, %rdx
je 0x3b74
addq %rcx, %rax
addq $0x30, %rax
movq (%r14), %rsi
movq (%rax), %rdi
callq 0x32f0
xorl %ebx, %ebx
negl %eax
sbbl %ebx, %ebx
orl %r15d, %ebx
jmp 0x3b77
movl %r15d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jasmeet13n[P]HTTP-Proxy-Server-Client/proxy.cpp
// Function: isExpired(int)
bool isExpired(int cb){
	time_t raw_time;
	time(&raw_time);
	struct tm * utc;
	utc = gmtime(&raw_time);
	raw_time = mktime(utc);
	//cout << "CACHE : " << cache[cb].expr << " :: CURRENT : " << raw_time << endl;
	if(cache[cb].expr-raw_time>0)
		return false;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq -0x18(%rbp), %r14
movq %r14, %rdi
callq 0x3280
movq %r14, %rdi
callq 0x3260
movq %rax, %rdi
callq 0x31b0
movq %rax, (%r14)
movslq %ebx, %rcx
leaq (%rcx,%rcx,4), %rcx
shlq $0x4, %rcx
leaq 0x789e(%rip), %rdx      # 0xb460
movslq 0x8(%rcx,%rdx), %rcx
cmpq %rcx, %rax
setge %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jasmeet13n[P]HTTP-Proxy-Server-Client/proxy.cpp
// Function: parse_http_request(char*, int)
struct info * parse_http_request(char *buf, int num_bytes){
	struct info* output = (struct info *)malloc(sizeof(struct info));
	int i;
	for(i=0; i<num_bytes; i++){
		if(buf[i]==' '){
			i++;
			break;
		}
	}
	int k=0;
	output->file[0]='/';
	if(buf[i+8]=='\r' && buf[i+9]=='\n'){
		output->file[1]='\0';
	}
	else{
		while(buf[i]!=' ')
			output->file[k++]=buf[i++];
		output->file[k]='\0';
	}
	i+=1;
	while(buf[i++]!=' ');
	k=0;
	while(buf[i]!='\r')
		output->host[k++]=buf[i++];
	output->host[k]='\0';
	return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movl $0x800, %edi            # imm = 0x800
callq 0x33d0
testl %r14d, %r14d
jle 0x3c21
movl %r14d, %edx
xorl %ecx, %ecx
cmpb $0x20, (%rbx,%rcx)
je 0x3c25
incq %rcx
cmpq %rcx, %rdx
jne 0x3c0f
movl %edx, %ecx
jmp 0x3c27
xorl %ecx, %ecx
jmp 0x3c27
incl %ecx
movb $0x2f, (%rax)
movslq %ecx, %rsi
cmpb $0xd, 0x8(%rbx,%rsi)
jne 0x3c43
cmpb $0xa, 0x9(%rbx,%rsi)
jne 0x3c43
movq %rax, %rsi
incq %rsi
jmp 0x3c6f
movb (%rbx,%rsi), %dl
cmpb $0x20, %dl
jne 0x3c4f
xorl %edx, %edx
jmp 0x3c69
addq %rbx, %rsi
incq %rsi
xorl %edi, %edi
movb %dl, (%rax,%rdi)
movb (%rsi,%rdi), %dl
incq %rdi
cmpb $0x20, %dl
jne 0x3c57
addl %edi, %ecx
movl %edi, %edx
movq %rax, %rsi
addq %rdx, %rsi
movb $0x0, (%rsi)
incl %ecx
movslq %ecx, %rdx
leaq (%rbx,%rdx), %rdi
shlq $0x20, %rdx
movabsq $0x100000000, %rsi      # imm = 0x100000000
addq %rsi, %rdx
incl %ecx
cmpb $0x20, (%rdi)
leaq 0x1(%rdi), %rdi
jne 0x3c89
sarq $0x20, %rdx
movb (%rbx,%rdx), %dl
cmpb $0xd, %dl
jne 0x3ca7
xorl %ecx, %ecx
jmp 0x3cc6
movslq %ecx, %rcx
addq %rbx, %rcx
incq %rcx
xorl %esi, %esi
movb %dl, 0x400(%rax,%rsi)
movb (%rcx,%rsi), %dl
incq %rsi
cmpb $0xd, %dl
jne 0x3cb2
movl %esi, %ecx
movb $0x0, 0x400(%rax,%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/clementino1971[P]ICC065-protoTerminal/protoTerminal.cpp
// Function: runCommand(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void runCommand(vector<string> command){
    if(command.empty()) return;

    if(command[0] == "pwd") {
            pwd(dir);
    }

    //run special functions
    if(mapa.find(command[0]) != mapa.end()){
        void (*choice)(vector<string>);
        choice = mapa[command[0]];
        choice(command);
    }else{
        run(command);
    }
    return;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq 0x8(%rbx), %rdi
je 0x2774
leaq 0x2924(%rip), %rsi      # 0x5020
callq 0x20a0
testl %eax, %eax
jne 0x2711
leaq 0x5bd4(%rip), %rdi      # 0x82e0
callq 0x4551
movq (%rbx), %rsi
leaq 0x5b2d(%rip), %rdi      # 0x8248
callq 0x3998
leaq 0x5b29(%rip), %rcx      # 0x8250
cmpq %rcx, %rax
je 0x2755
movq (%rbx), %rsi
leaq 0x5b12(%rip), %rdi      # 0x8248
callq 0x34a2
movq (%rax), %r15
leaq -0x48(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3522
movq %r14, %rdi
callq *%r15
jmp 0x276c
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3522
movq %r14, %rdi
callq 0x4590
movq %r14, %rdi
callq 0x35b6
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
jmp 0x278f
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x35b6
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O1/clementino1971[P]ICC065-protoTerminal/protoTerminal.cpp
// Function: balance(char const*, char)
char balance(const char* a, char del=0) {
    int i = 0;
    while(a[i]!=0) {
        if(!del) {
            if((i==0 || a[i-1]!='\\') && possible_delimiters.count(a[i])) del=a[i];
        }
        else {
            if((i==0 || a[i-1]!='\\') && a[i]==del) del=0;
        }
        i++;
    } 
    return del;
}

// Assembly:
movl %esi, %eax
movb (%rdi), %cl
testb %cl, %cl
je 0x2d05
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0x55d4(%rip), %r14      # 0x8278
xorl %r13d, %r13d
testb %al, %al
je 0x2cc3
testq %r13, %r13
je 0x2cb8
cmpb $0x5c, -0x1(%rbx,%r13)
je 0x2ceb
cmpb %al, %cl
movzbl %al, %eax
cmovel %r12d, %eax
jmp 0x2ceb
testq %r13, %r13
je 0x2cd0
cmpb $0x5c, -0x1(%rbx,%r13)
je 0x2ce9
leaq (%rbx,%r13), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3662
testq %rax, %rax
je 0x2ce9
movb (%r15), %al
jmp 0x2ceb
xorl %eax, %eax
movb 0x1(%rbx,%r13), %cl
incq %r13
testb %cl, %cl
jne 0x2ca7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/clementino1971[P]ICC065-protoTerminal/protoTerminal.cpp
// Function: clean_backwards(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string clean_backwards(string a) {
    string cleaned="";
    for(int i = a.size()-1;i>=0;i--) {
        if((i==0 || a[i-1]!='\\') && special_characters.count(a[i]));
        else cleaned = a[i]+cleaned;
    } 
    return cleaned;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
leaq 0x23dc(%rip), %rdx      # 0x510b
movq %rdx, %rsi
callq 0x3f3a
movq 0x8(%r14), %rcx
movl %ecx, %eax
decl %eax
js 0x2dca
movl %ecx, %ecx
movl %eax, %r15d
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
addq %rcx, %r13
movq %r15, %r12
subq $0x1, %r12
jb 0x2d68
movl %r13d, %eax
movq (%r14), %rcx
cmpb $0x5c, (%rcx,%rax)
je 0x2d7f
movq (%r14), %rsi
addq %r15, %rsi
leaq 0x5533(%rip), %rdi      # 0x82a8
callq 0x3662
testq %rax, %rax
jne 0x2dba
movq (%r14), %rax
movsbl (%rax,%r15), %esi
leaq -0x50(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rdx
callq 0x36b1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2270
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2dba
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2200
decq %r13
leaq 0x1(%r12), %rax
movq %r12, %r15
testq %rax, %rax
jg 0x2d56
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2dde
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x2df9
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O1/clementino1971[P]ICC065-protoTerminal/source/commands.cpp
// Function: run(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void run(vector<string> commands){
    int nWords = commands.size();

    char *myArgs[nWords+1];
    myArgs[nWords]=NULL;

    for(int i=0;i<nWords;i++){
        char* buffer = new char[commands[i].length()+1];
        strcpy(buffer, commands[i].c_str());


        if(strcmp(buffer,"<") == 0){
            buffer = new char[commands[i+1].length()+1];
            strcpy(buffer,commands[i+1].c_str());	

            freopen(buffer,"r+",stdin);

            i++;
            continue;
        }

        if(strcmp(buffer,">") == 0){
            buffer = new char[commands[i+1].length()+1];
            strcpy(buffer, commands[i+1].c_str());

            freopen(buffer, "w+", stdout);

            i++;
            continue;
        }

        myArgs[i] = buffer;

    }
    execvp(myArgs[0], myArgs);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rdi), %rax
movq %rdi, -0x40(%rbp)
subq (%rdi), %rax
movq %rax, %rdx
shrq $0x5, %rdx
leal 0x1(%rdx), %ecx
leaq 0xf(,%rcx,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rsi
subq %rcx, %rsi
movq %rsi, %rsp
shlq $0x1b, %rax
sarq $0x1d, %rax
movq %rsi, -0x30(%rbp)
movq $0x0, (%rax,%rsi)
movq %rdx, -0x38(%rbp)
testl %edx, %edx
jle 0x46c7
xorl %r15d, %r15d
movslq %r15d, %r13
movq -0x40(%rbp), %rax
movq (%rax), %r14
movq %r13, %rbx
shlq $0x5, %rbx
movq 0x8(%r14,%rbx), %rdi
incq %rdi
callq 0x2030
movq %rax, %r12
movq (%r14,%rbx), %rsi
movq %rax, %rdi
callq 0x21c0
movq %r12, %rdi
leaq 0xaf2(%rip), %rsi       # 0x5117
callq 0x22b0
testl %eax, %eax
je 0x464b
movq %r12, %rdi
leaq 0xae4(%rip), %rsi       # 0x511c
callq 0x22b0
testl %eax, %eax
je 0x4681
movq -0x30(%rbp), %rax
movq %r12, (%rax,%r13,8)
jmp 0x46ba
incl %r15d
movq 0x28(%rbx,%r14), %rdi
incq %rdi
callq 0x2030
movq %rax, %r12
movq 0x20(%rbx,%r14), %rsi
movq %rax, %rdi
callq 0x21c0
movq 0x3946(%rip), %rax      # 0x7fb8
movq (%rax), %rdx
movq %r12, %rdi
leaq 0xa9a(%rip), %rsi       # 0x5119
jmp 0x46b5
incl %r15d
movq 0x28(%rbx,%r14), %rdi
incq %rdi
callq 0x2030
movq %rax, %r12
movq 0x20(%rbx,%r14), %rsi
movq %rax, %rdi
callq 0x21c0
movq 0x38f8(%rip), %rax      # 0x7fa0
movq (%rax), %rdx
movq %r12, %rdi
leaq 0xa69(%rip), %rsi       # 0x511e
callq 0x2220
incl %r15d
cmpl -0x38(%rbp), %r15d
jl 0x45ee
movq -0x30(%rbp), %rsi
movq (%rsi), %rdi
callq 0x2150
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/3rdparty/gmp/gen-jacobitab.c
// Function: main
int
main (int argc, char **argv)
{
  unsigned bits;

  for (bits = 0; bits < 208; bits++)
    {
      unsigned e, a, b, d_old, d, q;

      if (bits && !(bits & 0xf))
	printf("\n");

      q = bits & 3;
      d = (bits >> 2) & 1;

      e = JACOBI_E (bits >> 3);
      a = JACOBI_A (bits >> 3);
      b = JACOBI_B (bits >> 3);
      d_old = JACOBI_D (bits >> 3);

      if (d != d_old && a == 3 && b == 3)
	e ^= 1;

      if (d == 1)
	{
	  if (b == 2)
	    e ^= (q & (a >> 1)) ^ (q >> 1);
	  a = (a - q * b) & 3;
	}
      else
	{
	  if (a == 2)
	    e ^= (q & (b >> 1)) ^ (q >> 1);
	  b = (b - q * a) & 3;
	}

      printf("%2d,", (encode (a, b, d) << 1) | e);
    }
  printf("\n");

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xe93(%rip), %r14       # 0x2010
leaq 0xea6(%rip), %rbx       # 0x202a
xorl %r15d, %r15d
testl %r15d, %r15d
sete %al
testb $0xf, %r15b
setne %cl
orb %al, %cl
jne 0x11a2
movl $0xa, %edi
callq 0x1030
movl %r15d, %esi
andl $0x3, %esi
movl %r15d, %edi
shrl $0x3, %edi
andl $0x1, %edi
movl %r15d, %eax
shrl $0x4, %eax
movb (%r14,%rax,2), %cl
movb 0x1(%r14,%rax,2), %dl
movzbl %cl, %ecx
movzbl %dl, %edx
cmpl $0x7, %eax
sete %al
movl %r15d, %r8d
shrb $0x2, %r8b
xorb %al, %r8b
cmpb $0x3, %cl
sete %al
andb %r8b, %al
cmpb $0x3, %dl
sete %r8b
andb %al, %r8b
movzbl %r8b, %eax
xorl %edi, %eax
testb $0x4, %r15b
jne 0x1213
cmpl $0x2, %ecx
jne 0x1206
movl %edx, %edi
shrl %edi
andl %esi, %edi
shrl %esi
xorl %edi, %esi
xorl %esi, %eax
movl %r15d, %esi
imull %ecx, %esi
subl %esi, %edx
andl $0x3, %edx
jmp 0x122f
cmpl $0x2, %edx
jne 0x1224
movl %ecx, %edi
shrl %edi
andl %esi, %edi
shrl %esi
xorl %edi, %esi
xorl %esi, %eax
movl %r15d, %esi
imull %edx, %esi
subl %esi, %ecx
andl $0x3, %ecx
cmpl $0x4, %ecx
jae 0x12fc
cmpl $0x4, %edx
jae 0x12dd
movl %ecx, %esi
orl %edx, %esi
testb $0x1, %sil
je 0x12be
cmpl $0x3, %edx
jne 0x1284
cmpl $0x3, %ecx
jne 0x1284
xorl %ecx, %ecx
testb $0x4, %r15b
sete %cl
leal (%rcx,%rcx,4), %esi
addl $0x7, %esi
addl %esi, %esi
orl %eax, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1050
incl %r15d
cmpl $0xd0, %r15d
jne 0x1187
jmp 0x12a7
xorl %esi, %esi
movzbl (%r14,%rsi,2), %edi
cmpl %edi, %ecx
jne 0x1299
movzbl 0x1(%r14,%rsi,2), %edi
cmpl %edi, %edx
je 0x1264
incq %rsi
cmpq $0xc, %rsi
jne 0x1286
callq 0x1040
movl $0xa, %edi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdc4(%rip), %rdi       # 0x2089
leaq 0xd63(%rip), %rsi       # 0x202f
leaq 0xd6c(%rip), %rcx       # 0x203f
movl $0x4a, %edx
callq 0x1060
leaq 0xd9f(%rip), %rdi       # 0x2083
leaq 0xd44(%rip), %rsi       # 0x202f
leaq 0xd4d(%rip), %rcx       # 0x203f
movl $0x49, %edx
callq 0x1060
leaq 0xd7a(%rip), %rdi       # 0x207d
leaq 0xd25(%rip), %rsi       # 0x202f
leaq 0xd2e(%rip), %rcx       # 0x203f
movl $0x48, %edx
callq 0x1060
// File: /workspace/github_cpp_makefile_star2_O1/Overv[P]pqpp/./pq.hpp
// Function: pq::connection::connection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
connection(const string& connInfo) {
            conn = shared_ptr<PGconn>(PQconnectdb(connInfo.c_str()), [=](PGconn* conn) {
                PQfinish(conn);
            });

            if (PQstatus(conn.get()) != CONNECTION_OK) {
                throw runtime_error(PQerrorMessage(conn.get()));
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq (%rsi), %rdi
callq 0x21a0
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %rax, %rsi
callq 0x338c
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x2e8f
callq 0x3464
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e9e
callq 0x3464
movq (%rbx), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x2eb4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x2130
movq %rax, %r14
movq (%rbx), %rdi
callq 0x22f0
movq %r14, %rdi
movq %rax, %rsi
callq 0x20f0
movq 0x610d(%rip), %rsi      # 0x8fe8
movq 0x60f6(%rip), %rdx      # 0x8fd8
movq %r14, %rdi
callq 0x21f0
movq %rax, %r15
movq %r14, %rdi
callq 0x22e0
jmp 0x2efc
jmp 0x2ef9
movq %rax, %r15
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2f0a
callq 0x3464
movq %r15, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O1/Overv[P]pqpp/./pq.hpp
// Function: std::vector<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, pq::value, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, pq::value>>>, std::allocator<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, pq::value, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, pq::value>>>>> pq::connection::exec<>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<row_t> exec(const string& query, Args... param_args) {
            vector<value> args = make_value_list(param_args...);
            vector<const char*> pq_args = make_pq_args(args);

            auto tmp = PQexecParams(conn.get(), query.c_str(), pq_args.size(), nullptr, pq_args.data(), nullptr, nullptr, 0);
            auto res = unique_ptr<PGresult, function<void(PGresult*)>>(tmp, [=](PGresult* res) {
                PQclear(res);
            });

            return get_rows(move(res));
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
leaq 0x8(%rsp), %rdi
callq 0x36f0
movq (%r14), %rdi
movq (%r15), %rsi
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %rdx
subq %r8, %rdx
shrq $0x3, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
callq 0x2230
addq $0x10, %rsp
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdx
movaps %xmm0, (%rdx)
leaq 0xc62(%rip), %rcx       # 0x3bde
movq %rcx, 0x18(%rdx)
leaq 0xc5f(%rip), %rcx       # 0x3be6
movq %rcx, 0x10(%rdx)
movq %rax, 0x20(%rdx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37a0
leaq 0x40(%rsp), %rdi
callq 0x34d4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2fb3
callq 0x2180
leaq 0x20(%rsp), %rdi
callq 0x3a64
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x34d4
jmp 0x2fdc
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2ff0
callq 0x2180
jmp 0x2ff0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3a64
movq %rbx, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O1/Overv[P]pqpp/./pq.hpp
// Function: pq::connection::prepare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
prepared_statement prepare(const string& name, const string& query, int parameters) {
            auto tmp = PQprepare(conn.get(), name.c_str(), query.c_str(), parameters, nullptr);
            auto res = unique_ptr<PGresult, function<void(PGresult*)>>(tmp, [=](PGresult* res) {
                PQclear(res);
            });

            if (PQresultStatus(res.get()) == PGRES_COMMAND_OK) {
                return prepared_statement(name, parameters);
            } else {
                throw runtime_error(PQerrorMessage(conn.get()));
            }
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq (%rdx), %rsi
movq (%rcx), %rdx
movl %r8d, %ecx
xorl %r8d, %r8d
callq 0x20e0
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x4bc(%rip), %rcx       # 0x3530
movq %rcx, 0x18(%rsp)
leaq 0x4b8(%rip), %rcx       # 0x3538
movq %rcx, 0x10(%rsp)
movq %rax, 0x20(%rsp)
movq %rax, %rdi
callq 0x23c0
cmpl $0x1, %eax
jne 0x30c9
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3550
movl %ebp, 0x20(%rbx)
movq %rsp, %rdi
callq 0x34d4
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2130
movq %rax, %rbx
movq (%r14), %rdi
callq 0x22f0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x20f0
movq 0x5ef8(%rip), %rsi      # 0x8fe8
movq 0x5ee1(%rip), %rdx      # 0x8fd8
movq %rbx, %rdi
callq 0x21f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x22e0
jmp 0x310f
movq %rax, %r14
movq %rsp, %rdi
callq 0x34d4
movq %r14, %rdi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O1/Overv[P]pqpp/./pq.hpp
// Function: std::vector<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, pq::value, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, pq::value>>>, std::allocator<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, pq::value, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, pq::value>>>>> pq::connection::exec<char const*, int>(pq::prepared_statement const&, char const*, int)
vector<row_t> exec(const prepared_statement& stmt, Args... param_args) {
            vector<value> args = make_value_list(param_args...);
            vector<const char*> pq_args = make_pq_args(args);

            auto tmp = PQexecPrepared(conn.get(), stmt.get_name().c_str(), stmt.get_parameters(), pq_args.data(), nullptr, nullptr, 0);
            auto res = unique_ptr<PGresult, function<void(PGresult*)>>(tmp, [=](PGresult* res) {
                PQclear(res);
            });

            return get_rows(move(res));
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %rcx, %rsi
movl %r8d, %edx
callq 0x45a2
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x36f0
movq (%r14), %rdi
movq (%r15), %rsi
movl 0x20(%r15), %edx
movq 0x10(%rsp), %rcx
movl $0x0, (%rsp)
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21c0
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdx
movaps %xmm0, (%rdx)
leaq 0x1950(%rip), %rcx      # 0x4ada
movq %rcx, 0x18(%rdx)
leaq 0x194d(%rip), %rcx      # 0x4ae2
movq %rcx, 0x10(%rdx)
movq %rax, 0x20(%rdx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37a0
leaq 0x40(%rsp), %rdi
callq 0x34d4
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x31c1
callq 0x2180
leaq 0x28(%rsp), %rdi
callq 0x3a64
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x34d4
jmp 0x31ec
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3200
callq 0x2180
jmp 0x3200
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3a64
movq %rbx, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O1/Overv[P]pqpp/./pq.hpp
// Function: pq::connection::make_pq_args(std::vector<pq::value, std::allocator<pq::value>> const&)
vector<const char*> make_pq_args(const vector<value>& arguments) {
            vector<const char*> pq_args;

            for (auto& val : arguments) {
                if (val.is_null()) {
                    pq_args.push_back(nullptr);
                } else {
                    pq_args.push_back(val.str().c_str());
                }
            }

            return pq_args;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %r15
movq 0x8(%rdx), %r12
cmpq %r12, %r15
je 0x3776
movq %rsp, %r14
cmpb $0x1, 0x20(%r15)
jne 0x373a
movq $0x0, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3755
movq $0x0, (%rsi)
jmp 0x374e
movq (%r15), %rax
movq %rax, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3762
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x376d
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3aa8
jmp 0x376d
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3aa8
addq $0x28, %r15
cmpq %r12, %r15
jne 0x3718
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3787
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3797
callq 0x2180
movq %r14, %rdi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O1/YiweiMao[P]tessDX/src/tessellator.cpp
// Function: CHWTessellator::Init(D3D11_TESSELLATOR_PARTITIONING, D3D11_TESSELLATOR_OUTPUT_PRIMITIVE)
void CHWTessellator::Init(  
    D3D11_TESSELLATOR_PARTITIONING       partitioning,
    D3D11_TESSELLATOR_OUTPUT_PRIMITIVE   outputPrimitive)
{
    if( 0 == m_Point )
    {
        m_Point = new DOMAIN_POINT[MAX_POINT_COUNT];
    }
    if( 0 == m_Index )
    {
        m_Index = new int[MAX_INDEX_COUNT];
    }
    m_partitioning = partitioning;
    m_originalPartitioning = partitioning;
    switch( partitioning )
    {
    case D3D11_TESSELLATOR_PARTITIONING_INTEGER:
    default:
        break;
    case D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD:
        m_parity = TESSELLATOR_PARITY_ODD;
        break;
    case D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN:
        m_parity = TESSELLATOR_PARITY_EVEN;
        break;
    }
    m_originalParity = m_parity;
    m_outputPrimitive = outputPrimitive;
    m_NumPoints = 0;
    m_NumIndices = 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
cmpq $0x0, 0x18(%rdi)
jne 0x402026
movl $0x8408, %edi           # imm = 0x8408
callq 0x406550
movq %rax, 0x18(%r14)
cmpq $0x0, 0x20(%r14)
jne 0x40203b
movl $0x18000, %edi          # imm = 0x18000
callq 0x406550
movq %rax, 0x20(%r14)
movl %ebp, 0xc(%r14)
movl %ebp, 0x8(%r14)
cmpl $0x2, %ebp
je 0x402051
cmpl $0x3, %ebp
jne 0x40205a
xorl %eax, %eax
jmp 0x402056
movl $0x1, %eax
movl %eax, 0x4(%r14)
movl 0x4(%r14), %eax
movl %eax, (%r14)
movl %ebx, 0x10(%r14)
movq $0x0, 0x28(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/YiweiMao[P]tessDX/src/tessellator.cpp
// Function: CHWTessellator::DefineClockwiseTriangle(int, int, int, int)
void CHWTessellator::DefineClockwiseTriangle(int index0, int index1, int index2, int indexStorageBaseOffset)
{
    // inputs a clockwise triangle, stores a CW or CCW triangle depending on the state
    DefineIndex(index0,indexStorageBaseOffset);
    bool bWantClockwise = (m_outputPrimitive == D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW) ? true : false;
    if( bWantClockwise )
    {
        DefineIndex(index1,indexStorageBaseOffset+1);
        DefineIndex(index2,indexStorageBaseOffset+2);
    }
    else
    {
        DefineIndex(index2,indexStorageBaseOffset+1);
        DefineIndex(index1,indexStorageBaseOffset+2);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %r15
callq 0x4046a0
movq 0x20(%r15), %r12
movslq %ebx, %rbx
movl %eax, (%r12,%rbx,4)
cmpl $0x2, 0x10(%r15)
movl %ebp, %esi
cmovel %r14d, %esi
cmovel %ebp, %r14d
movq %r15, %rdi
callq 0x4046a0
movl %eax, 0x4(%r12,%rbx,4)
movq %r15, %rdi
movl %r14d, %esi
callq 0x4046a0
movl %eax, 0x8(%r12,%rbx,4)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/YiweiMao[P]tessDX/src/tessellator.cpp
// Function: CHWTessellator::NumPointsForTessFactor(unsigned int)
int CHWTessellator::NumPointsForTessFactor( FXP fxpTessFactor )
{
    int numPoints;
    if( Odd() )
    {
        numPoints = (fxpCeil(FXP_ONE_HALF + (fxpTessFactor+1/*round*/)/2)*2)>>FXP_FRACTION_BITS;
    }
    else
    {
        numPoints = ((fxpCeil((fxpTessFactor+1/*round*/)/2)*2)>>FXP_FRACTION_BITS)+1;
    }
    return numPoints;
}

// Assembly:
incl %esi
movl %esi, %eax
shrl %eax
cmpl $0x1, 0x4(%rdi)
jne 0x4031b6
addl $0x8000, %eax           # imm = 0x8000
movl %eax, %ecx
andl $0x7fff0000, %ecx       # imm = 0x7FFF0000
addl $0x10000, %ecx          # imm = 0x10000
testw %ax, %ax
cmovel %eax, %ecx
shrl $0xf, %ecx
movzwl %cx, %eax
retq
movl %eax, %ecx
andl $0x7fff0000, %ecx       # imm = 0x7FFF0000
addl $0x10000, %ecx          # imm = 0x10000
testl $0x1fffe, %esi          # imm = 0x1FFFE
cmovel %eax, %ecx
shrl $0xf, %ecx
movzwl %cx, %eax
incl %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/YiweiMao[P]tessDX/src/tessellator.cpp
// Function: CHWTessellator::TessellateTriDomain(float, float, float, float)
void CHWTessellator::TessellateTriDomain( float tessFactor_Ueq0, float tessFactor_Veq0, float tessFactor_Weq0, 
                                        float insideTessFactor )
{
    PROCESSED_TESS_FACTORS_TRI processedTessFactors;
    TriProcessTessFactors(tessFactor_Ueq0,tessFactor_Veq0,tessFactor_Weq0,insideTessFactor,processedTessFactors);

    if( processedTessFactors.bPatchCulled )
    {
        m_NumPoints = 0;
        m_NumIndices = 0;
        return;
    }
    else if( processedTessFactors.bJustDoMinimumTessFactor )
    {
        DefinePoint(/*U*/0,/*V*/FXP_ONE,/*pointStorageOffset*/0); //V=1 (beginning of Ueq0 edge VW)
        DefinePoint(/*U*/0,/*V*/0,/*pointStorageOffset*/1); //W=1 (beginning of Veq0 edge WU)
        DefinePoint(/*U*/FXP_ONE,/*V*/0,/*pointStorageOffset*/2); //U=1 (beginning of Weq0 edge UV)
        m_NumPoints = 3;

        switch(m_outputPrimitive)
        {
        case D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW:
        case D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW:
            // function orients them CCW if needed
            DefineClockwiseTriangle(0,1,2,/*indexStorageBaseOffset*/m_NumIndices);
            m_NumIndices = 3;
            break;
        case D3D11_TESSELLATOR_OUTPUT_POINT:
            DumpAllPoints();
            break;
        case D3D11_TESSELLATOR_OUTPUT_LINE:
            DumpAllPointsAsInOrderLineList();
            break;
        }
        return;
    }

    TriGeneratePoints(processedTessFactors);
    
    if( m_outputPrimitive == D3D11_TESSELLATOR_OUTPUT_POINT )
    {
        DumpAllPoints();
        return;
    }
    if( m_outputPrimitive == D3D11_TESSELLATOR_OUTPUT_LINE )
    {
        DumpAllPointsAsInOrderLineList();
        return;
    }

    TriGenerateConnectivity(processedTessFactors); // can be done in parallel to TriGeneratePoints()
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x4038c6
cmpb $0x1, 0x71(%r14)
jne 0x40381c
movq $0x0, 0x28(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r14
retq
cmpb $0x1, 0x70(%rsp)
jne 0x403857
movq 0x18(%rbx), %rax
movsd 0xc2861(%rip), %xmm0    # 0x4c6090
movups %xmm0, (%rax)
movq $0x3f800000, 0x10(%rax) # imm = 0x3F800000
movl $0x3, 0x28(%rbx)
movl 0x10(%rbx), %eax
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jb 0x403892
testl %eax, %eax
je 0x40386e
cmpl $0x1, %eax
je 0x403880
jmp 0x403811
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x403c3e
movl 0x10(%rbx), %eax
cmpl $0x1, %eax
je 0x403880
testl %eax, %eax
jne 0x4038b6
movq %rbx, %rdi
addq $0x88, %rsp
popq %rbx
popq %r14
jmp 0x4026c2
movq %rbx, %rdi
addq $0x88, %rsp
popq %rbx
popq %r14
jmp 0x402704
movl 0x2c(%rbx), %r8d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x40266a
movl $0x3, 0x2c(%rbx)
jmp 0x403811
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x403fee
jmp 0x403811