LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::readBinaryTree(TreeNode*&, std::basic_ifstream<char, std::char_traits<char>>&)
void HashTree::readBinaryTree(TreeNode *&p, ifstream &fin) {
	//TODO: handle exceptions
	int curr[1];
	fin.read((char*)curr, sizeof(int));
	unsigned int currNum = (unsigned int)(curr[0]);
	if(currNum == 0)
		return;
	else
	{
		TreeNode *a = NULL;
		TreeNode *c = NULL;
		TreeNode *g = NULL;
		TreeNode *t = NULL;

		readBinaryTree(a, fin);
		readBinaryTree(c, fin);
		readBinaryTree(g, fin);
		readBinaryTree(t, fin);
		if (a == NULL && c == NULL && g == NULL && t == NULL) {
			p = new LeafNode(currNum);
		}
		else {
			p = new TreeNode(currNum);
			p->setA(a);
			p->setC(c);
			p->setG(g);
			p->setT(t);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1c(%rsp), %r12
movl $0x4, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3310
movl (%r12), %r12d
testl %r12d, %r12d
je 0x6d37
movq %rbx, 0x8(%rsp)
xorl %eax, %eax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq %rcx, %rsi
leaq 0x30(%rsp), %r13
movq %rax, (%r13)
leaq 0x28(%rsp), %rbp
movq %rax, (%rbp)
leaq 0x20(%rsp), %rbx
movq %rax, (%rbx)
movq %r15, %rdi
movq %r14, %rdx
callq 0x6bec
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x6bec
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x6bec
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6bec
leaq 0x10(%rsp), %rax
movq (%rax), %r14
movq (%r13), %r15
movq (%rbp), %r13
movq (%rbx), %rbx
movq %rbx, %xmm0
movq %r13, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %r15, %xmm0
movq %r14, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
por %xmm1, %xmm2
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
movmskps %xmm2, %eax
xorl $0xf, %eax
je 0x6d09
movl $0x38, %edi
callq 0x3270
leaq 0x602e(%rip), %rcx      # 0xcd08
movq %rcx, (%rax)
movl %r12d, 0x8(%rax)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x18(%rax)
movdqu %xmm0, 0x28(%rax)
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %r14, 0x18(%rax)
movq %r15, 0x20(%rax)
movq %r13, 0x28(%rax)
movq %rbx, 0x30(%rax)
jmp 0x6d37
movl $0x40, %edi
callq 0x3270
movl %r12d, 0x8(%rax)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x18(%rax)
movdqu %xmm0, 0x28(%rax)
leaq 0x601c(%rip), %rcx      # 0xcd48
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/HashTree.cc
// Function: HashTree::loadTree(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void HashTree::loadTree(string dbName)
{
	std::ifstream f;
	f.open(dbName.c_str(),ios::in | ios::binary);
	if(f.is_open())
	{
		f.seekg(0, ios::beg);

		int curr[1];
		f.read((char*)(&curr), sizeof(int));
		unsigned int hashLength = (unsigned int)(curr[0]);

		int curr2[1];
		f.read((char*)(&curr2), sizeof(int));
		unsigned int fullLength = (unsigned int)(curr2[0]);

		this->hashLength = hashLength;
		this->fullLength = fullLength;

		unsigned int tbsize = 1 << (2 * hashLength);
		this->root = new TreeNode*[tbsize];

		for (int i = 0; i < tbsize; i++)
			this->root[i] = NULL;

		for(int i = 0; i < tbsize; i++)
		{
			readBinaryTree(this->root[i], f);
		}

		f.close();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x32c0
movq (%r14), %rsi
movq %r15, %rdi
movl $0xc, %edx
callq 0x3180
leaq 0x80(%rsp), %rdi
callq 0x30b0
testb %al, %al
je 0x6e3a
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3370
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
callq 0x3310
movl 0x4(%rsp), %ebp
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
movl $0x4, %edx
callq 0x3310
movl (%rsp), %eax
movl %ebp, (%rbx)
movl %eax, 0x4(%rbx)
addl %ebp, %ebp
movl $0x1, %r14d
movl %ebp, %ecx
shll %cl, %r14d
leaq (,%r14,8), %rdi
callq 0x3030
movq %rax, 0x320(%rbx)
movl %r14d, %r15d
xorl %eax, %eax
movq 0x320(%rbx), %rcx
movq $0x0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r15
jne 0x6df3
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movq 0x320(%rbx), %rsi
addq %r12, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6bec
addq $0x8, %r12
decq %r15
jne 0x6e12
leaq 0x8(%rsp), %rdi
callq 0x3090
leaq 0x8(%rsp), %rdi
callq 0x30c0
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6e5c
jmp 0x6e5c
jmp 0x6e5c
jmp 0x6e5c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3450
nop
// File: /workspace/github_cpp_makefile_star2_O1/AnthonyCalandra[P]chip8-emu/src/keypad.cc
// Function: Keypad::isPressed(char)
bool Keypad::isPressed(const char keyCode) {
  auto keyState = this->keymap.find(keyCode);
  if (keyState == this->keymap.end()) {
    return false;
  } else {
    return keyState->second;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rax
movq (%rdi), %r9
movq 0x8(%rdi), %r8
xorl %r10d, %r10d
xorl %edx, %edx
divq %r8
movq (%r9,%rdx,8), %rax
testq %rax, %rax
je 0x3bca
movq (%rax), %r9
movq %rax, %r10
cmpb %sil, 0x8(%r9)
je 0x3bca
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x3bc7
movsbq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x3bca
movq %r11, %r10
cmpb %sil, %dil
jne 0x3b9a
jmp 0x3bca
xorl %r10d, %r10d
testq %r10, %r10
je 0x3bd4
movq (%r10), %rax
jmp 0x3bd6
xorl %eax, %eax
testq %rax, %rax
je 0x3be0
movb 0x9(%rax), %al
jmp 0x3be2
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AnthonyCalandra[P]chip8-emu/src/sdlutils.cc
// Function: gameLoop(SDL_Window*, SDL_Renderer*)
void gameLoop(SDL_Window* window, SDL_Renderer* renderer) {
  SDL_Event event;
  buffer.clear();
  while (!quit) {
    while (SDL_PollEvent(&event)) {
      if (event.type == SDL_QUIT) {
        quit = true;
      }

      if (event.type == SDL_KEYDOWN) {
        SDL_Keycode keyCode = event.key.keysym.sym;
        if (isChip8KeyEvent(keyCode)) {
          const char* keyName = SDL_GetKeyName(keyCode);
          keypad.pressedDown(keyName[0]);
          if (!keySent) {
            keyPressPromise.set_value(keyName[0]);
            keySent = true;
          }
        }
      } else if (event.type == SDL_KEYUP) {
        SDL_Keycode keyCode = event.key.keysym.sym;
        if (isChip8KeyEvent(keyCode)) {
          const char* keyName = SDL_GetKeyName(keyCode);
          keypad.pressedUp(keyName[0]);
        }
      }
    }

    if (drawFlag) {
      renderTexture(renderer, buffer, 0, 0);
      SDL_RenderPresent(renderer);
      drawFlag = false;
    }

    SDL_Delay(5);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
leaq 0xb3dd(%rip), %rdi      # 0xf330
callq 0x4bb4
movb 0xd3fb(%rip), %al       # 0x11359
testb $0x1, %al
jne 0x4077
leaq -0x68(%rbp), %r14
leaq 0xb387(%rip), %r12      # 0xf2f8
leaq -0x29(%rbp), %r15
movq %r14, %rdi
callq 0x31c0
testl %eax, %eax
je 0x4032
cmpl $0x100, -0x68(%rbp)     # imm = 0x100
jne 0x3f96
movb $0x1, %al
xchgb %al, 0xd3c3(%rip)       # 0x11359
movl -0x68(%rbp), %eax
cmpl $0x301, %eax            # imm = 0x301
je 0x4000
cmpl $0x300, %eax            # imm = 0x300
jne 0x3f75
movl -0x54(%rbp), %edi
leal -0x30(%rdi), %eax
cmpl $0xa, %eax
setae %al
leal -0x61(%rdi), %ecx
cmpl $0x6, %ecx
setae %cl
testb %cl, %al
jne 0x3f75
callq 0x33c0
movq %rax, %r13
movsbl (%rax), %esi
movq %r12, %rdi
callq 0x3c04
movb 0xd381(%rip), %al       # 0x1135a
testb $0x1, %al
jne 0x3f75
movb (%r13), %al
movb %al, -0x29(%rbp)
leaq 0xd375(%rip), %rdi      # 0x11360
movq %r15, %rsi
callq 0x42a4
movb $0x1, %al
xchgb %al, 0xd35f(%rip)       # 0x1135a
jmp 0x3f75
movl -0x54(%rbp), %edi
leal -0x30(%rdi), %eax
cmpl $0xa, %eax
setae %al
leal -0x61(%rdi), %ecx
cmpl $0x6, %ecx
setae %cl
testb %cl, %al
jne 0x3f75
callq 0x33c0
movsbl (%rax), %esi
movq %r12, %rdi
callq 0x3be4
jmp 0x3f75
movb 0xd320(%rip), %al       # 0x11358
testb $0x1, %al
je 0x405f
movq %rbx, %rdi
leaq 0xb2ea(%rip), %rsi      # 0xf330
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4086
movq %rbx, %rdi
callq 0x30a0
xorl %eax, %eax
xchgb %al, 0xd2f9(%rip)       # 0x11358
movl $0x5, %edi
callq 0x3230
movb 0xd2ea(%rip), %al       # 0x11359
testb $0x1, %al
je 0x3f75
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AnthonyCalandra[P]chip8-emu/src/sdlutils.cc
// Function: renderTexture(SDL_Renderer*, VideoBuffer&, unsigned int, unsigned int)
bool renderTexture(SDL_Renderer* renderer, VideoBuffer& buffer, unsigned int x, unsigned int y) {
  std::size_t depth = sizeof(VideoBufferPixelType) * 8;
  std::size_t pitch = chip8ScreenWidth * sizeof(VideoBufferPixelType);
  SDL_Surface* surface = SDL_CreateRGBSurfaceFrom((void*) buffer.getBuffer().data(), chip8ScreenWidth, chip8ScreenHeight, depth, pitch, 0, 0, 0, 0);
  SDL_Texture* texture = nullptr;
  if (surface != nullptr) {
    texture = SDL_CreateTextureFromSurface(renderer, surface);
    SDL_FreeSurface(surface);
    if (surface == nullptr) {
      return false;
    }
  } else {
    return false;
  }

  SDL_Rect dst;
  dst.x = x;
  dst.y = y;
  SDL_QueryTexture(texture, NULL, NULL, &dst.w, &dst.h);
  dst.h *= 10;
  dst.w *= 10;
  SDL_RenderCopy(renderer, texture, nullptr, &dst);
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %rbx
leaq -0x2028(%rbp), %r14
movq %r14, %rdi
callq 0x4bf4
subq $0x8, %rsp
xorl %eax, %eax
movq %r14, %rdi
movl $0x40, %esi
movl $0x20, %edx
movl $0x20, %ecx
movl $0x100, %r8d            # imm = 0x100
xorl %r9d, %r9d
pushq %rax
pushq %rax
pushq %rax
callq 0x3320
addq $0x20, %rsp
movq %rax, %r14
testq %rax, %rax
je 0x414e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33f0
movq %rax, %r13
movq %r14, %rdi
callq 0x32f0
leaq -0x2020(%rbp), %rcx
movl %r12d, -0x8(%rcx)
movl %r15d, -0x4(%rcx)
leaq -0x201c(%rbp), %r15
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %r8
callq 0x31b0
movl -0x4(%r15), %eax
movl (%r15), %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movl %ecx, (%r15)
addl %eax, %eax
leal (%rax,%rax,4), %eax
movl %eax, -0x4(%r15)
leaq -0x2028(%rbp), %rcx
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x3370
testq %r14, %r14
setne %al
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AnthonyCalandra[P]chip8-emu/src/videobuffer.cc
// Function: VideoBuffer::clear()
void VideoBuffer::clear() {
  this->mutex.lock();
  // Fill with black pixels.
  this->buffer.fill(fillColor);
  this->mutex.unlock();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x2000(%rdi), %rbx
movq %rbx, %rdi
callq 0x3430
testl %eax, %eax
jne 0x4bec
movl $0x2000, %edx           # imm = 0x2000
movq %r14, %rdi
xorl %esi, %esi
callq 0x3180
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3260
movl %eax, %edi
callq 0x31e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/AnthonyCalandra[P]chip8-emu/src/videobuffer.cc
// Function: VideoBuffer::getBuffer()
VideoBufferType VideoBuffer::getBuffer() {
  this->mutex.lock();
  VideoBufferType copyBuffer = this->buffer;
  this->mutex.unlock();
  return copyBuffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2000(%rsi), %r14
movq %r14, %rdi
callq 0x3430
testl %eax, %eax
jne 0x4c3d
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3280
movq %r14, %rdi
callq 0x3260
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/AnthonyCalandra[P]chip8-emu/src/cpu.cc
// Function: executeChipCpu(Registers, MemoryStore, Stack)
void executeChipCpu(Registers registers, MemoryStore memory, Stack stack) {
  while (!quit) {
    performCpuCycle(registers, memory, stack);
    // Sleep for about 60 times a second.
    std::this_thread::sleep_for(std::chrono::milliseconds(15));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0xa670(%rip), %r13      # 0x11359
movb (%r13), %al
testb $0x1, %al
jne 0x6d43
movq %rdi, %rbx
leaq 0x1010(%rbp), %r14
leaq 0x10(%rbp), %r15
leaq -0x38(%rbp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x69c8
movq $0x0, -0x38(%rbp)
movq $0xe4e1c0, -0x30(%rbp)  # imm = 0xE4E1C0
movq %r12, %rdi
movq %r12, %rsi
callq 0x3100
cmpl $-0x1, %eax
jne 0x6d3b
callq 0x3060
cmpl $0x4, (%rax)
je 0x6d21
movb (%r13), %al
testb $0x1, %al
je 0x6d03
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/onlyuser[P]Sandbox/test_c/pre_0x/main4.cpp
// Function: main
int main() {
    // C-style array
    int my_array[5] = {1, 2, 3, 4, 5};

    // Pass the array to a function
    func(my_array);

    return 0;
}

// Assembly:
subq $0x18, %rsp
movaps 0xe49(%rip), %xmm0      # 0x2010
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movl $0x5, 0x10(%rdi)
callq 0x11e0
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/onlyuser[P]Sandbox/test_c/pre_0x/main4.cpp
// Function: void func<int, 5>(int (&) [5])
void func(T (&a)[N]) {
#if 1
    for(int i = 0; i < N; i++) {
        std::cout << a[i] << std::endl;
    }
#else
    // Here N stores the correct size information for the array
    // Basically N is equal to sizeof(my_array)/sizeof(my_array[0]) so the next code will work as expected:
    for(int i = 0; i < N; ++i) {
        a[i] = a[i] + i;
    }
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
movq 0x2de3(%rip), %r14      # 0x3fd8
movl (%rbx,%r12,4), %esi
movq %r14, %rdi
callq 0x1080
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
incq %r12
cmpq $0x5, %r12
jne 0x11f5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: PortalFlow(portal_t*)
void            PortalFlow(portal_t* p)
{
    threaddata_t    data;
    unsigned        i;

    if (p->status != stat_working)
        Error("PortalFlow: reflowed");

    p->visbits = (byte*)calloc(1, g_bitbytes);

    memset(&data, 0, sizeof(data));
    data.leafvis = p->visbits;
    data.base = p;

    data.pstack_head.head = &data.pstack_head;
    data.pstack_head.portal = p;
    data.pstack_head.source = p->winding;
    data.pstack_head.portalplane = &p->plane;
    for (i = 0; i < g_bitlongs; i++)
    {
        ((long*)data.pstack_head.mightsee)[i] = ((long*)p->mightsee)[i];
    }
    RecursiveLeafFlow(p->leaf, &data, &data.pstack_head);

#ifdef ZHLT_NETVIS
    p->fromclient = g_clientid;
#endif
    p->status = stat_done;
#ifdef ZHLT_NETVIS
    Flag_VIS_DONE_PORTAL(g_visportalindex);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x14f0, %rsp           # imm = 0x14F0
movq %rdi, %rbx
cmpl $0x1, 0x20(%rdi)
je 0xc9b7
leaq 0x8b08(%rip), %rdi      # 0x154b8
xorl %eax, %eax
callq 0x8d9c
leaq 0x2092dea(%rip), %rax   # 0x209f7a8
movl (%rax), %esi
movl $0x1, %edi
callq 0x3160
movq %rax, %r14
movq %rax, 0x28(%rbx)
movq %rsp, %r15
movl $0x14f0, %edx           # imm = 0x14F0
movq %r15, %rdi
xorl %esi, %esi
callq 0x3120
movq %r14, (%r15)
movq %rbx, 0x8(%r15)
leaq 0x10(%rsp), %rdx
movq %rdx, 0x1000(%rdx)
movq %rbx, 0x1010(%rdx)
movq 0x18(%rbx), %rax
movq %rax, 0x1018(%rdx)
movq %rbx, 0x14c8(%rdx)
leaq 0x2092d96(%rip), %rax   # 0x209f7ac
movl (%rax), %eax
testq %rax, %rax
je 0xca34
movq 0x30(%rbx), %rcx
xorl %esi, %esi
movq (%rcx,%rsi,8), %rdi
movq %rdi, 0x10(%rsp,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0xca23
movl 0x10(%rbx), %edi
movq %rsp, %rsi
callq 0xca53
movl $0x2, 0x20(%rbx)
addq $0x14f0, %rsp           # imm = 0x14F0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: SimpleFlood(unsigned char*, int, unsigned char*, unsigned int*)
static void     SimpleFlood(byte* const srcmightsee, const int leafnum, byte* const portalsee, unsigned int* const c_leafsee)
{
    unsigned        i;
    leaf_t*         leaf;
    portal_t*       p;

    {
        const unsigned  offset = leafnum >> 3;
        const unsigned  bit = (1 << (leafnum & 7));
    
        if (srcmightsee[offset] & bit)
        {
            return;
        }
        else
        {
            srcmightsee[offset] |= bit;
        }
    }

    (*c_leafsee)++;
    leaf = &g_leafs[leafnum];

    for (i = 0; i < leaf->numportals; i++)
    {
        p = leaf->portals[i];
        if (!portalsee[p - g_portals])
        {
            continue;
        }
        SimpleFlood(srcmightsee, p->leaf, portalsee, c_leafsee);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rdi, %r15
movl %esi, %eax
sarl $0x3, %eax
movl %esi, %ecx
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
movzbl (%rdi,%rax), %ecx
movl %esi, %edi
andl $0x7, %edi
btl %edi, %ecx
jb 0xd124
orb %cl, %dl
movb %dl, (%r15,%rax)
movq (%rsp), %rax
incl (%rax)
leaq 0x20926c0(%rip), %rax   # 0x209f780
movq (%rax), %r12
movslq %esi, %rax
imulq $0x810, %rax, %rax      # imm = 0x810
cmpl $0x0, (%r12,%rax)
je 0xd124
addq %rax, %r12
xorl %r13d, %r13d
leaq 0x2092697(%rip), %rbp   # 0x209f778
movabsq $-0x71c71c71c71c71c7, %rbx # imm = 0x8E38E38E38E38E39
movq 0x10(%r12,%r13,8), %rax
movq %rax, %rcx
subq (%rbp), %rcx
sarq $0x3, %rcx
imulq %rbx, %rcx
cmpb $0x0, (%r14,%rcx)
je 0xd118
movl 0x10(%rax), %esi
movq %r15, %rdi
movq %r14, %rdx
movq (%rsp), %rcx
callq 0xd079
incq %r13
movl (%r12), %eax
cmpq %rax, %r13
jb 0xd0eb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: SaveVisData(char const*)
void		SaveVisData(const char *filename)
{
	int i;
	FILE *fp = fopen(filename, "wb");

	if(!fp)
		return;

	SafeWrite(fp, g_dvisdata, (vismap_p - g_dvisdata));

	// BUG BUG BUG!
	// Leaf offsets need to be saved too!!!!
	for(i = 0; i < g_numleafs; i++)
	{
		SafeWrite(fp, &g_dleafs[i].visofs, sizeof(int));
	}

	fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x432f(%rip), %rsi      # 0x139b6
callq 0x32b0
testq %rax, %rax
je 0xf6f8
movq %rax, %rbx
movl 0x20e0136(%rip), %edx   # 0x20ef7d0
leaq 0x14c3f(%rip), %rsi     # 0x242e0
subl %esi, %edx
movq %rax, %rdi
callq 0x86b7
leaq 0xa14c62(%rip), %r15    # 0xa24314
cmpl $0x0, (%r15)
jle 0xf6e5
leaq 0xa14c61(%rip), %r14    # 0xa24320
addq $0x4, %r14
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x86b7
incq %r12
movslq (%r15), %rax
addq $0x1c, %r14
cmpq %rax, %r12
jl 0xf6c6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3230
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: VisLeafnumForPoint(float const*)
int        VisLeafnumForPoint(const vec3_t point)
{
    int             nodenum;
    vec_t           dist;
    dnode_t*        node;
    dplane_t*       plane;

    nodenum = 0;
    while (nodenum >= 0)
    {
        node = &g_dnodes[nodenum];
        plane = &g_dplanes[node->planenum];
        dist = DotProduct(point, plane->normal) - plane->dist;
        if (dist >= 0.0)
        {
            nodenum = node->children[0];
        }
        else
        {
            nodenum = node->children[1];
        }
    }

    return -nodenum - 2;
}

// Assembly:
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm1
movss 0x8(%rdi), %xmm2
xorl %edx, %edx
leaq 0x10b4b45(%rip), %rax   # 0x10c4260
leaq 0xaf4b2e(%rip), %rcx    # 0xb04250
xorps %xmm3, %xmm3
movl %edx, %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %rdx
movslq (%rdx), %rsi
leaq (%rsi,%rsi,4), %rsi
movss 0x4(%rcx,%rsi,4), %xmm4
mulss %xmm1, %xmm4
movss (%rcx,%rsi,4), %xmm5
mulss %xmm0, %xmm5
addss %xmm4, %xmm5
movss 0x8(%rcx,%rsi,4), %xmm4
mulss %xmm2, %xmm4
addss %xmm5, %xmm4
subss 0xc(%rcx,%rsi,4), %xmm4
xorl %esi, %esi
ucomiss %xmm3, %xmm4
setb %sil
movswl 0x4(%rdx,%rsi,2), %edx
testl %edx, %edx
jns 0xf725
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
subl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: LeafThread(int)
static void     LeafThread(int unused)
{
    portal_t*       p;

    while (1)
    {
        if (!(p = GetNextPortal()))
        {
            return;
        }

        PortalFlow(p);

        Verbose("portal:%4i  mightsee:%4i  cansee:%4i\n", (int)(p - g_portals), p->nummightsee, p->numcansee);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x4fd2(%rip), %rbx      # 0x16109
movl $0x1, %ebp
callq 0x9f1c
cmpl $-0x1, %eax
je 0x11188
callq 0xa191
movl 0x208e61f(%rip), %eax   # 0x209f770
testl %eax, %eax
jle 0x1118d
addl %eax, %eax
movq 0x208e61a(%rip), %rcx   # 0x209f778
cmpl $0x2, %eax
cmovll %ebp, %eax
movl $0x1869f, %edx          # imm = 0x1869F
xorl %r14d, %r14d
movl 0x38(%rcx), %esi
cmpl %edx, %esi
jae 0x1117e
cmpl $0x0, 0x20(%rcx)
cmoveq %rcx, %r14
cmovel %esi, %edx
addq $0x48, %rcx
decl %eax
jne 0x1116c
jmp 0x11190
xorl %r14d, %r14d
jmp 0x111a2
xorl %r14d, %r14d
testq %r14, %r14
je 0x1119d
movl $0x1, 0x20(%r14)
callq 0xa1a2
testq %r14, %r14
je 0x111da
movq %r14, %rdi
callq 0xc994
movq %r14, %rax
subq 0x208e5bf(%rip), %rax   # 0x209f778
shrq $0x3, %rax
imull $0x38e38e39, %eax, %esi # imm = 0x38E38E39
movl 0x38(%r14), %edx
movl 0x3c(%r14), %ecx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x91ef
jmp 0x1113c
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlvis/zones.cpp
// Function: Zones::getZoneFromBounds(BoundingBox const&)
UINT32 Zones::getZoneFromBounds(const BoundingBox& bounds)
{
    UINT32 x;
    for (x=0; x<m_ZoneCount; x++)
    {
        if (m_ZoneBounds[x].testSuperset(bounds))
        {
            return x;
        }
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x8(%rdi)
je 0x1123c
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %ebx, %ebx
movq 0x20(%r15), %rsi
addq %r12, %rsi
movq %r14, %rdi
callq 0x117e8
testb %al, %al
jne 0x1123e
incq %rbx
movl 0x8(%r15), %eax
addq $0x18, %r12
cmpq %rax, %rbx
jb 0x11219
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlvis/zones.cpp
// Function: Zones::getZoneFromWinding(Winding const&)
UINT32 Zones::getZoneFromWinding(const Winding& winding)
{
    UINT32          x;
    BoundingBox     bounds;

    for (x=0; x<winding.m_NumPoints; x++)
    {
        bounds.add(winding.m_Points[x]);
    }

    return getZoneFromBounds(bounds);
}

// Assembly:
subq $0x18, %rsp
movaps 0x4069(%rip), %xmm0     # 0x152c0
movaps %xmm0, (%rsp)
movsd 0x403d(%rip), %xmm0     # 0x152a0
movsd %xmm0, 0x10(%rsp)
movl 0x8(%rsi), %ecx
testq %rcx, %rcx
je 0x112f0
movss 0x14(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movss 0x10(%rsp), %xmm2
movss (%rsp), %xmm3
movss 0x4(%rsp), %xmm4
movss 0xc(%rsp), %xmm5
movq 0x10(%rsi), %rax
shlq $0x2, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
minss (%rax,%rdx), %xmm3
movss %xmm3, (%rsp)
maxss (%rax,%rdx), %xmm5
movss %xmm5, 0xc(%rsp)
minss 0x4(%rax,%rdx), %xmm4
movss %xmm4, 0x4(%rsp)
maxss 0x4(%rax,%rdx), %xmm2
movss %xmm2, 0x10(%rsp)
minss 0x8(%rax,%rdx), %xmm1
movss %xmm1, 0x8(%rsp)
maxss 0x8(%rax,%rdx), %xmm0
movss %xmm0, 0x14(%rsp)
addq $0xc, %rdx
cmpq %rdx, %rcx
jne 0x112a2
movq %rsp, %rsi
callq 0x11200
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlvis/zones.h
// Function: Zones::Zones(unsigned int)
Zones(UINT32 ZoneCount)
    {
        m_ZoneCount = ZoneCount + 1;    // Zone 0 is used for all points outside all nodes
        m_ZoneVisMatrix = new bool[m_ZoneCount * m_ZoneCount];
        memset(m_ZoneVisMatrix, 0, sizeof(bool) * m_ZoneCount * m_ZoneCount);
        m_ZonePtrs = new bool*[m_ZoneCount];
        m_ZoneBounds = new BoundingBox[m_ZoneCount];

        UINT32 x;
        bool* dstPtr = m_ZoneVisMatrix;
        bool** srcPtr = m_ZonePtrs;
        for (x=0; x<m_ZoneCount; x++, srcPtr++, dstPtr += m_ZoneCount)
        {
            *srcPtr = dstPtr;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movq %rdi, %r14
leaq 0x9658(%rip), %rax      # 0x1ad80
movq %rax, (%rdi)
leal 0x1(%r12), %ebp
movl %ebp, 0x8(%rdi)
movl %ebp, %edi
imull %edi, %edi
callq 0x3040
movq %rax, %rbx
movq %rax, 0x10(%r14)
movq %rbp, %rdx
imulq %rbp, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3120
leaq (,%rbp,8), %r13
movq %r13, %rdi
callq 0x3040
movq %rax, %r15
movq %rax, 0x18(%r14)
leaq (,%rbp,2), %rax
addq %rbp, %rax
leaq 0x8(,%rax,8), %rdi
callq 0x3040
leaq 0x8(%rax), %rcx
movq %rbp, (%rax)
incl %r12d
je 0x117c0
leaq (,%r13,2), %rdx
addq %r13, %rdx
xorl %esi, %esi
movaps 0x3b1c(%rip), %xmm0     # 0x152c0
movsd 0x3af4(%rip), %xmm1     # 0x152a0
movups %xmm0, 0x8(%rax,%rsi)
movsd %xmm1, 0x18(%rax,%rsi)
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x117ac
movq %rcx, 0x20(%r14)
testq %rbp, %rbp
je 0x117d9
xorl %eax, %eax
movq %rbx, (%r15,%rax,8)
addq %rbp, %rbx
incq %rax
cmpl %eax, %ebp
jne 0x117cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/common/boundingbox.h
// Function: BoundingBox::testSubset(BoundingBox const&) const
bool testSubset(const BoundingBox& other) const
    {
        if (
                (m_Mins[0] >= other.m_Mins[0]) &&
                (m_Maxs[0] <= other.m_Maxs[0]) &&
                (m_Mins[1] >= other.m_Mins[1]) &&
                (m_Maxs[1] <= other.m_Maxs[1]) &&
                (m_Mins[2] >= other.m_Mins[2]) &&
                (m_Maxs[2] <= other.m_Maxs[2])
           )
        {
            return true;
        }
        return false;
    }

// Assembly:
movss (%rdi), %xmm0
ucomiss (%rsi), %xmm0
jb 0x1182a
movss 0xc(%rsi), %xmm0
ucomiss 0xc(%rdi), %xmm0
jb 0x1182a
movss 0x4(%rdi), %xmm0
ucomiss 0x4(%rsi), %xmm0
jb 0x1182a
movss 0x10(%rsi), %xmm0
ucomiss 0x10(%rdi), %xmm0
jb 0x1182a
movss 0x8(%rdi), %xmm0
ucomiss 0x8(%rsi), %xmm0
jb 0x1182a
movss 0x14(%rsi), %xmm0
movb $0x1, %al
ucomiss 0x14(%rdi), %xmm0
jae 0x1182c
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::Proxy()
Proxy() : 
		logger { "log.txt" },
		cache { LRUCache(CACHE_SIZE) }
	{
		// error shouldn't happen in the constructor
		// but if it does, release all the resouces allocated and exit the process
		constructServer();
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x98c9(%rip), %rsi      # 0xd020
leaq 0x98c9(%rip), %rdx      # 0xd027
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x3c86
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3a1a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x378d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3340
movabsq $0x1f400000000, %rax    # imm = 0x1F400000000
movq %rax, 0x250(%r14)
leaq 0x258(%r14), %r15
movq %r15, 0x260(%r14)
movq %r15, 0x258(%r14)
movq $0x0, 0x268(%r14)
leaq 0x270(%r14), %r12
leaq 0x2a0(%r14), %rax
movq %rax, 0x270(%r14)
movq $0x1, 0x278(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x280(%r14)
movl $0x3f800000, 0x290(%r14) # imm = 0x3F800000
movups %xmm0, 0x298(%r14)
leaq 0x9825(%rip), %rax      # 0xd028
movq %rax, 0x2a8(%r14)
movq %r14, %rdi
callq 0x3ab4
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r12, %rdi
callq 0x3db2
movq %r15, %rdi
callq 0x40c0
movq %rbx, %rdi
callq 0x3c36
jmp 0x3855
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3855
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3340
movq %r14, %rdi
callq 0x3510
nop
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::run()
void run()
	{
		unsigned client_id = 0; // id to mark different 

		// (1) wait until an request of sending arrives
		// (2) every time a client fd is caught, create a new thread to handle the request
		while(true)
		{ 
			std::string client_ip;
			int client_fd = acceptConnection(client_ip);
			if(client_fd == -1) // request error
			{
				continue;
			}
			std::thread thd(&Proxy::handleRequest, this, client_id, client_fd, client_ip);
			thd.detach();

			// assign every request/thread a unique id
			client_id = (client_id == INT_MAX) ? 0 : ++client_id;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq %rsp, %rax
movl $0x0, (%rax)
leaq 0x20(%rsp), %r13
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x30(%rsp), %rbp
leaq 0x4(%rsp), %r14
movq %r13, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4106
movl %eax, 0x4(%rsp)
cmpl $-0x1, %eax
je 0x3911
leaq 0x8bd(%rip), %rax       # 0x417c
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq %rbx, 0x30(%rsp)
movq %r12, %rdi
leaq 0x38(%rsp), %rsi
movq %rbp, %rdx
movq %rsp, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x51f2
movq %r12, %rdi
callq 0x3500
movl (%rsp), %eax
xorl %ecx, %ecx
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
je 0x3906
incl %eax
movl %eax, (%rsp)
movl %eax, %ecx
movl %ecx, (%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x3939
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x3891
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0x3891
cmpq $0x0, 0x8(%rsp)
je 0x3940
callq 0x30c0
jmp 0x3940
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x395a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3340
movq %rbx, %rdi
callq 0x3510
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::acceptConnection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int acceptConnection(std::string & client_ip)
    {
    	// keep waiting until a client request
        struct sockaddr_storage socket_addr;
        socklen_t socket_addr_len = sizeof(socket_addr);
        int accept_fd = accept(socket_fd, (struct sockaddr *)&socket_addr, &socket_addr_len); // accept() implements blocking accept
        if(accept_fd == -1) 
        {
            return -1;
        }

        // get the client ip
        struct sockaddr_in * temp = (struct sockaddr_in *)&socket_addr;
  		client_ip = inet_ntoa(temp->sin_addr);

        return accept_fd;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
leaq 0x4(%rsp), %rdx
movl $0x80, (%rdx)
movl 0x2b4(%rdi), %edi
leaq 0x8(%rsp), %rsi
callq 0x30f0
cmpl $-0x1, %eax
je 0x4166
movl %eax, %ebx
movl 0xc(%rsp), %edi
callq 0x3160
movq %rax, %r15
movq 0x8(%r14), %r12
movq %rax, %rdi
callq 0x3150
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x3480
jmp 0x416b
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/./Request.hpp
// Function: Request::operator=(Request const&)
Request & operator=(const Request & rhs)
	{
		if(this != &rhs)
		{
			request_time = rhs.request_time;
			first_line = rhs.first_line;
			httpAction = rhs.httpAction;
			url = rhs.url;
			hostname = rhs.hostname;
			port = rhs.port;
			content = rhs.content;
		}
		return *this;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x554f
movq %rsi, %r14
movq %rbx, %rdi
callq 0x31e0
leaq 0x20(%r14), %rsi
leaq 0x20(%rbx), %rdi
callq 0x31e0
leaq 0x40(%r14), %rsi
leaq 0x40(%rbx), %rdi
callq 0x31e0
leaq 0x60(%r14), %rsi
leaq 0x60(%rbx), %rdi
callq 0x31e0
movl $0x80, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x31e0
movl $0xa0, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x31e0
movl $0xc0, %edi
addq %rdi, %r14
addq %rbx, %rdi
movq %r14, %rsi
callq 0x70c2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/./Logger.hpp
// Function: Logger::log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void log(const std::string & content)
	{
		// protect against data race
		std::unique_lock<std::mutex> lck(mtx);

		// open the file in append mode if closed
		if(!out.is_open())
		{
			out.open(path, std::ofstream::out | std::ofstream::app);
		}

		out << content << std::endl;
		out.close();
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %rbx
movq %rdi, (%rbx)
movb $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x723e
movb $0x1, 0x8(%rbx)
leaq 0x48(%r15), %rbx
leaq 0xb8(%r15), %rdi
callq 0x30a0
testb %al, %al
jne 0x5761
addq $0x28, %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x11, %edx
callq 0x3180
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x3380
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3310
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x3410
movq %rsp, %rdi
callq 0x7228
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7228
movq %rbx, %rdi
callq 0x3510
nop
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::handleGetPost(int, int, int, Request const&)
void handleGetPost(int client_id, int client_fd, int server_fd, const Request & request)
	{
		try
		{
			sendRequest(server_fd, request);
			getResponse(client_id, client_fd, server_fd, request);
		}
		catch(std::exception & e)
		{
			throw e;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movl %ecx, %esi
movq %r8, %rdx
callq 0xc642
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0xc722
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x6a98
movq %rbx, %rdi
callq 0x3130
movl $0x8, %edi
callq 0x31a0
movq 0xb545(%rip), %rcx      # 0x11fb8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0xb54f(%rip), %rsi      # 0x11fd0
movq 0xb568(%rip), %rdx      # 0x11ff0
movq %rax, %rdi
callq 0x34e0
movq %rax, %rbx
callq 0x34c0
movq %rbx, %rdi
callq 0x3510
movq %rax, %rdi
callq 0x3d16
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/./Parser.hpp
// Function: Parser::parseRequest(Request&)
void parseRequest(Request & request)
	{
		bool extractAddrPort_suc = false;
		std::string temp;
		for(char c : request.content)
		{
			// extract the first line of the request
			if(c == '\r') 
			{
				break;
			}
			request.first_line += c;

			// extract http action, hostname, port
			if(!extractAddrPort_suc && c == ' ')
			{
				// get HTTP action and url from request
				if(request.httpAction.empty())
				{
					pushClear(temp, request.httpAction);
				}
				else
				{
					pushClear(temp, request.url);
					extractAddrPort(request.url, request.hostname, request.port);
					extractAddrPort_suc = true;
				}
			}
			else
			{
				temp += c;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xc0(%rsi), %r14
movq %rsi, 0x30(%rsp)
movq 0xc8(%rsi), %r12
cmpq %r12, %r14
je 0x6e13
movq 0x30(%rsp), %rax
leaq 0x20(%rax), %r15
leaq 0x40(%rax), %rcx
movq %rcx, 0x38(%rsp)
leaq 0x60(%rax), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x80(%rax), %rcx
movq %rcx, 0x48(%rsp)
addq $0xa0, %rax
movq %rax, 0x40(%rsp)
incq %r14
xorl %ebx, %ebx
movb -0x1(%r14), %r13b
cmpb $0xd, %r13b
je 0x6dfd
movsbl %r13b, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x32c0
cmpb $0x20, %r13b
setne %al
orb %bl, %al
testb $0x1, %al
je 0x6d85
leaq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0x32c0
jmp 0x6dfd
movq 0x30(%rsp), %rax
cmpq $0x0, 0x48(%rax)
movq 0x10(%rsp), %rax
je 0x6dd8
testq %rax, %rax
je 0x6dbb
movq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x31e0
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rax
movb $0x0, (%rax)
movb $0x1, %bl
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
callq 0x6f40
jmp 0x6dfd
testq %rax, %rax
je 0x6dfd
movq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x31e0
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rax
movb $0x0, (%rax)
cmpb $0xd, %r13b
je 0x6e13
leaq 0x1(%r14), %rax
cmpq %r12, %r14
movq %rax, %r14
jne 0x6d4e
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6e2f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3340
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6e5d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3340
movq %rbx, %rdi
callq 0x3510
nop
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/./Parser.hpp
// Function: Parser::extractAddrPort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void extractAddrPort(std::string & url, std::string & hostname, std::string & port)
	{
		// eg: http://people.duke.edu/~bmr23/ece568/
		// url: http://people.duke.edu/~bmr23/ece568/
		// hostname: people.duke.edu
		// port: 80
		if(url.find("http://") == 0)
		{
			// port number
			port = "80";

			// hostname
			int idx = 0;
			int N = url.length();
			int slash = 0;
			for(; idx < N; ++idx)
			{
				slash += url[idx] == '/';
				if(slash == 3) // "http://" has two slash
				{
					break;
				}
			}
			hostname = url.substr(7, idx - 7);
		}

		// eg: github.com:443
		// url: github.com
		// hostname: github.com
		// port: 443
		else
		{
			int idx = url.find_last_of(':');
			hostname = url.substr(0, idx);
			url = url.substr(0, idx);
			port = "443";
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x6282(%rip), %rsi      # 0xd1df
movl $0x7, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x34f0
testq %rax, %rax
je 0x7018
movq %rbx, %rdi
movl $0x3a, %esi
movq $-0x1, %rdx
callq 0x3570
movslq %eax, %r12
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x3360
movq %r14, %rdi
movq %r13, %rsi
callq 0x33b0
movq (%r13), %rdi
leaq 0x10(%rsp), %r13
cmpq %r13, %rdi
je 0x6fc5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x3360
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33b0
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x6ff8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
movq 0x8(%r15), %rdx
leaq 0x61e7(%rip), %rcx      # 0xd1ea
movl $0x3, %r8d
movq %r15, %rdi
xorl %esi, %esi
callq 0x3480
jmp 0x70b4
movq 0x8(%r15), %rdx
leaq 0x61c4(%rip), %rcx      # 0xd1e7
xorl %r12d, %r12d
movl $0x2, %r8d
movq %r15, %rdi
xorl %esi, %esi
callq 0x3480
movq 0x8(%rbx), %rax
testl %eax, %eax
jle 0x7075
movq (%rbx), %rdx
movl %eax, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movl %r12d, %edi
xorl %r12d, %r12d
cmpb $0x2f, (%rdx,%rcx)
sete %r12b
addl %edi, %r12d
cmpl $0x3, %r12d
je 0x706d
incq %rcx
cmpq %rcx, %rsi
jne 0x704b
movq %rax, %rcx
addl $-0x7, %ecx
movslq %ecx, %rcx
jmp 0x707c
movq $-0x7, %rcx
movq %rsp, %r15
movl $0x7, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3360
movq %r14, %rdi
movq %r15, %rsi
callq 0x33b0
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x70b4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3340
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/./LRUCache.hpp
// Function: LRUCache::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Response get(const std::string & url) 
    {
        std::unique_lock<std::mutex> lck(mtx1);

        // url doesn't exist in cache
        if(!existsUrl(url))
        {
            throw ProxyException("Url doesn't exist in cache");
        }

        Response ret = kv[url];
        cache.remove(url);
        cache.push_back(url);
        return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xafc8(%rip), %rax      # 0x122f0
movq %rsp, %r12
movq %rax, (%r12)
movb $0x0, 0x8(%r12)
movq %r12, %rdi
callq 0x723e
movb $0x1, 0x8(%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x72a2
testb %al, %al
je 0x73aa
leaq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0x8686
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8418
leaq 0x8(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x85f2
movq %r12, %rdi
movq %r15, %rsi
callq 0x8e02
movq %rax, %rdi
movq %r12, %rsi
callq 0x3050
incq 0x18(%r14)
movq %rsp, %rdi
callq 0x7228
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x31a0
movq %rax, %rbx
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x5f9e(%rip), %rsi      # 0xd365
leaq 0x5fb1(%rip), %rdx      # 0xd37f
leaq 0x10(%rsp), %rdi
callq 0x3c86
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6aa8
xorl %ebp, %ebp
leaq 0xa917(%rip), %rsi      # 0x11d08
leaq -0x906(%rip), %rdx      # 0x6af2
movq %rbx, %rdi
callq 0x34e0
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x7422
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0x7422
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x7441
movq %rbx, %rdi
callq 0x3250
jmp 0x7441
movq %rax, %r14
movq %rbx, %rdi
callq 0x3ee8
jmp 0x7441
movq %rax, %r14
movq %rsp, %rdi
callq 0x7228
movq %r14, %rdi
callq 0x3510
nop
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::respondCached(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void respondCached(int client_fd, const std::string & url)
	{
		// send response to the client
		Response response = cache.get(url);
		for(const auto & seg : response.content)
		{
			int sent_length = 0;
			int length_to_be_sent = seg.size();
			while(sent_length < length_to_be_sent)
			{
				int len = send(client_fd, &seg.data()[0] + sent_length, length_to_be_sent - sent_length, 0);
				if(len == -1)
				{
					throw ProxyException("Send with cached response error");
				}
				sent_length += len;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movl %esi, %ebx
leaq 0x250(%rdi), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x730c
movq 0x68(%r14), %r15
movq 0x70(%r14), %r14
cmpq %r14, %r15
je 0x74c2
movl 0x8(%r15), %ebp
subl (%r15), %ebp
testl %ebp, %ebp
jle 0x74bc
xorl %r12d, %r12d
movslq %r12d, %rax
movq (%r15), %rsi
addq %rax, %rsi
movl %ebp, %ecx
subl %eax, %ecx
movslq %ecx, %rdx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x31b0
cmpl $-0x1, %eax
je 0x756a
addl %eax, %r12d
cmpl %ebp, %r12d
jl 0x7492
addq $0x18, %r15
jmp 0x747f
leaq 0x90(%rsp), %rbx
movq 0x70(%rbx), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x74eb
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x3fb8
movq %rbx, %rdi
callq 0x3f6a
movq -0x38(%r14), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x7524
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x753f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3340
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x755a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3340
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x31a0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x5df9(%rip), %rsi      # 0xd380
leaq 0x5e11(%rip), %rdx      # 0xd39f
leaq 0x8(%rsp), %rdi
callq 0x3c86
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6aa8
xorl %ebp, %ebp
leaq 0xa757(%rip), %rsi      # 0x11d08
leaq -0xac6(%rip), %rdx      # 0x6af2
movq %rbx, %rdi
callq 0x34e0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x75e2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3340
jmp 0x75e2
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x75f4
movq %rbx, %rdi
callq 0x3250
jmp 0x75f4
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x3ee8
movq %r14, %rdi
callq 0x3510
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::insertSectionToContent(std::vector<char, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<char> insertSectionToContent(const std::vector<char> & content, const std::string & section)
	{
		int idx = findFirstLine(content); // idx is the index of the '\r' in the first line of response
		std::vector<char> content_to_send(content.begin(), content.begin() + idx);
		for(char c : section) content_to_send.push_back(c);
		content_to_send.insert(content_to_send.end(), content.begin() + idx, content.end());
		return content_to_send;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdi, %rbx
movl 0x8(%rdx), %eax
movq %rdx, 0x10(%rsp)
movq (%rdx), %rsi
subl %esi, %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
jl 0x76d1
decl %eax
xorl %ecx, %ecx
cmpb $0xd, (%rsi,%rcx)
jne 0x76c7
cmpb $0xa, 0x1(%rsi,%rcx)
je 0x76d1
incq %rcx
cmpq %rcx, %rax
jne 0x76ba
movl %eax, %ecx
movslq %ecx, %r15
leaq (%rsi,%r15), %rdx
leaq 0xf(%rsp), %rcx
movq %rbx, %rdi
callq 0x8e54
movq 0x8(%r12), %r13
testq %r13, %r13
je 0x7729
movq (%r12), %rbp
xorl %r14d, %r14d
leaq 0xe(%rsp), %r12
movb (%rbp,%r14), %al
movb %al, 0xe(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x7716
movb %al, (%rsi)
incq 0x8(%rbx)
jmp 0x7721
movq %rbx, %rdi
movq %r12, %rdx
callq 0x8ef6
incq %r14
cmpq %r14, %r13
jne 0x76fb
movq 0x8(%rbx), %rsi
movq 0x10(%rsp), %rax
addq (%rax), %r15
movq 0x8(%rax), %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8fe8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7758
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x776f
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x3340
movq %r14, %rdi
callq 0x3510
nop
// File: /workspace/github_cpp_makefile_star2_O1/dentiny[P]HTTP-Cache-Proxy/Proxy.cpp
// Function: Proxy::checkStatusCode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool checkStatusCode(const std::string & header)
	{
		int idx = header.find("\r\n");
		int i = 0;
		for(; i + 2 <= idx; ++i)
		{
			if(header[i] == '3' && header[i + 1] == '0' && header[i + 2] == '4')
			{
				return true;
			}
		}
		return false;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x432f(%rip), %rsi      # 0xd537
movl $0x2, %r14d
movl $0x2, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x34f0
cmpl $0x2, %eax
setge %cl
jl 0x924a
movq (%rbx), %rdx
cmpb $0x33, -0x2(%rdx,%r14)
jne 0x923f
cmpb $0x30, -0x1(%rdx,%r14)
jne 0x923f
cmpb $0x34, (%rdx,%r14)
je 0x924a
incq %r14
cmpl %eax, %r14d
setle %cl
jle 0x9228
andb $0x1, %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop