LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: Pack(unsigned char, unsigned long, unsigned char*)
uint8_t *Pack(uint8_t bitsPerMsg, uint64_t length, uint8_t* data){
  //Assumes bitsPerMsg <= 8
  uint64_t newLength = packLength(length, bitsPerMsg);
  uint8_t* buffer = new uint8_t[newLength];
  memset(buffer, 0, newLength);
  
  uint8_t bitPointer = 0;
  uint64_t index = 0;

  for (int i = 0; i < length; i++){
    if (bitPointer + bitsPerMsg <= 8){
      buffer[index] += data[i] << bitPointer;
      bitPointer += bitsPerMsg;
      if (bitPointer == 8){
        index += 1;
        bitPointer = 0;
      }
    }
    else{
      uint8_t rightBits = 8 - bitPointer;
      uint8_t mask = (1 << rightBits) - 1;
      buffer[index] += (data[i] & mask) << bitPointer;
      
      index += 1;
      buffer[index] =  data[i] >> rightBits;
      bitPointer = bitsPerMsg - rightBits;
    }
  }
  return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movl %edi, %r12d
imulq %rsi, %r12
addq $0x7, %r12
shrq $0x3, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, %r15
xorl %r13d, %r13d
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2140
testq %r14, %r14
je 0x475b
movzbl %bpl, %eax
xorl %ecx, %ecx
xorl %esi, %esi
xorl %edx, %edx
movzbl %sil, %edi
addl %eax, %edi
cmpl $0x8, %edi
ja 0x4724
movzbl (%rbx,%rcx), %r8d
shlxl %esi, %r8d, %esi
addb %sil, (%r15,%rdx)
xorl %esi, %esi
cmpl $0x8, %edi
sete %sil
cmovel %r13d, %edi
addq %rsi, %rdx
movl %edi, %esi
jmp 0x4753
movl $0x8, %edi
subl %esi, %edi
movzbl %dil, %edi
movzbl (%rbx,%rcx), %r8d
bzhil %edi, %r8d, %r9d
shlxl %esi, %r9d, %esi
addb %sil, (%r15,%rdx)
shrxl %edi, %r8d, %esi
movb %sil, 0x1(%r15,%rdx)
incq %rdx
movl %eax, %esi
subl %edi, %esi
incq %rcx
cmpq %rcx, %r14
jne 0x46f7
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: Unpack(unsigned char, unsigned long, unsigned char*, unsigned char*)
uint8_t *Unpack(uint8_t bitsPerMsg, uint64_t length, uint8_t* data, uint8_t* out){
  //Assumes bitsPerMsg <= 8
  uint64_t newLength = packLength(length, bitsPerMsg);
  
  uint8_t bitPointer = 0;
  uint64_t index = 0;

  uint8_t mask = (1 << bitsPerMsg) - 1;

  for (int i = 0; i < length; i++){
    if (bitPointer + bitsPerMsg <= 8){
      //REGULAR CASE
      out[i] = (data[index] >> bitPointer) & mask;
      bitPointer += bitsPerMsg;
      if (bitPointer == 8){
        index += 1;
        bitPointer = 0;
      }
    }
    else{
      //OVERLAP CASE
      uint8_t reconstructedValue = 0;

      uint8_t rightBits = 8 - bitPointer;
      reconstructedValue += data[index] >> bitPointer;

      index += 1;
      uint8_t leftBits = bitsPerMsg - rightBits;
      uint8_t newMask = (1 << leftBits) - 1;
      reconstructedValue += (data[index] & newMask) << rightBits;
      out[i] = reconstructedValue;

      bitPointer = leftBits;
    }
  }
  return out;
}

// Assembly:
movq %rcx, %rax
testq %rsi, %rsi
je 0x4816
pushq %rbp
pushq %r14
pushq %rbx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
shlxl %edi, %ecx, %ecx
notl %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r11d, %r11d
xorl %r10d, %r10d
movzbl %r11b, %ebx
addl %edi, %ebx
cmpl $0x8, %ebx
ja 0x47d6
movzbl (%rdx,%r10), %ebp
shrxl %r11d, %ebp, %r11d
andl %ecx, %r11d
movb %r11b, (%rax,%r9)
xorl %r11d, %r11d
cmpl $0x8, %ebx
sete %r11b
cmovel %r8d, %ebx
addq %r11, %r10
movl %ebx, %r11d
jmp 0x480a
movl $0x8, %ebx
subl %r11d, %ebx
movzbl (%rdx,%r10), %ebp
shrxl %r11d, %ebp, %ebp
movzbl %bl, %ebx
movl %edi, %r11d
subl %ebx, %r11d
movzbl 0x1(%rdx,%r10), %r14d
incq %r10
bzhil %r11d, %r14d, %r14d
shlxl %ebx, %r14d, %ebx
addl %ebp, %ebx
movb %bl, (%rax,%r9)
incq %r9
cmpq %r9, %rsi
jne 0x47a4
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: WriteProtocolArgs(std::basic_ofstream<char, std::char_traits<char>>&, ProtocolArgs)
void WriteProtocolArgs(ofstream &out1, struct ProtocolArgs args)
{
  out1.write((char *)&args.N, sizeof(args.N));
  out1.write((char *)&args.C, sizeof(args.C));
  out1.write((char *)&args.FSM1_rounds, sizeof(args.FSM1_rounds));
  out1.write((char *)&args.FSM2_rounds, sizeof(args.FSM2_rounds));

  for (int i = 0; i < args.FSM1_rounds; i++){
    out1.write((char *)&args.FSM1_steps[i], sizeof(uint8_t));
  }
  for (int i = 0; i < args.FSM2_rounds; i++){
    out1.write((char *)&args.FSM2_steps[i], sizeof(uint8_t));
  }
  for (int i = 0; i < args.C; i++){
    out1.write((char *)&args.bits_per_component[i], sizeof(uint8_t));
  }
  

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %edx
callq 0x2310
leaq 0x4(%rbx), %r15
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2310
leaq 0x8(%rbx), %rsi
movl $0x4, %edx
movq %r14, %rdi
callq 0x2310
leaq 0xc(%rbx), %r12
movl $0x4, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2310
cmpl $0x0, 0x8(%rbx)
je 0x4891
xorl %r13d, %r13d
movq 0x10(%rbx), %rsi
addq %r13, %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x2310
incq %r13
movl 0x8(%rbx), %eax
cmpq %rax, %r13
jb 0x4872
cmpl $0x0, (%r12)
je 0x48ba
xorl %r12d, %r12d
movq 0x18(%rbx), %rsi
addq %r12, %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x2310
incq %r12
movl 0xc(%rbx), %eax
cmpq %rax, %r12
jb 0x489b
cmpl $0x0, (%r15)
je 0x48e2
xorl %r15d, %r15d
movq 0x20(%rbx), %rsi
addq %r15, %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x2310
incq %r15
movl 0x4(%rbx), %eax
cmpq %rax, %r15
jb 0x48c3
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ProtocolArgs::ProtocolArgs(std::basic_ifstream<char, std::char_traits<char>>&)
ProtocolArgs::ProtocolArgs(ifstream &in)
{
  alloc_OT = false;

  in.read((char *)&N, sizeof(N));
  in.read((char *)&C, sizeof(C));
  in.read((char *)&FSM1_rounds, sizeof(FSM1_rounds));
  in.read((char *)&FSM2_rounds, sizeof(FSM2_rounds));

  FSM1_steps = new uint8_t[FSM1_rounds];
  for (int i = 0; i < FSM1_rounds; i++){
    in.read((char *)&FSM1_steps[i], sizeof(uint8_t));
  }

  FSM2_steps = new uint8_t[FSM2_rounds];
  for (int i = 0; i < FSM2_rounds; i++){
    in.read((char *)&FSM2_steps[i], sizeof(uint8_t));
  }
  bits_per_component = new uint8_t[C];
  for (int i = 0; i < C; i++){
    in.read((char *)&bits_per_component[i], sizeof(uint8_t));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x28(%rdi)
movl $0x4, %edx
movq %rsi, %rdi
movq %r14, %rsi
callq 0x22f0
leaq 0x4(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x22f0
leaq 0x8(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x22f0
leaq 0xc(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x22f0
movl 0x8(%r14), %r15d
movq %r15, %rdi
callq 0x2030
movq %rax, 0x10(%r14)
testq %r15, %r15
je 0x4976
xorl %r15d, %r15d
movq 0x10(%r14), %rsi
addq %r15, %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x22f0
incq %r15
movl 0x8(%r14), %eax
cmpq %rax, %r15
jb 0x4956
movl 0xc(%r14), %r15d
movq %r15, %rdi
callq 0x2030
movq %rax, 0x18(%r14)
testq %r15, %r15
je 0x49ae
xorl %r15d, %r15d
movq 0x18(%r14), %rsi
addq %r15, %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x22f0
incq %r15
movl 0xc(%r14), %eax
cmpq %rax, %r15
jb 0x498e
movl 0x4(%r14), %r15d
movq %r15, %rdi
callq 0x2030
movq %rax, 0x20(%r14)
testq %r15, %r15
je 0x49e6
xorl %r15d, %r15d
movq 0x20(%r14), %rsi
addq %r15, %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x22f0
incq %r15
movl 0x4(%r14), %eax
cmpq %rax, %r15
jb 0x49c6
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ReadInSenderOTsFSM1(std::basic_ifstream<char, std::char_traits<char>>&, ProtocolArgs)
SenderOTCorrelation** ReadInSenderOTsFSM1(ifstream &in, struct ProtocolArgs args)
{
  SenderOTCorrelation** FSM1 = new SenderOTCorrelation*[args.FSM1_rounds];

  for (int i = 0; i < args.FSM1_rounds; i++)
  {
    FSM1[i] = new SenderOTCorrelation(in, bits_FSM1_SOT);
  }
  return FSM1;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rsi), %r12d
leaq (,%r12,8), %rdi
callq 0x2030
movq %rax, %r15
testq %r12, %r12
je 0x4cbd
xorl %r13d, %r13d
movl $0x130, %edi            # imm = 0x130
callq 0x2250
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x3ad6
movq %r12, (%r15,%r13,8)
incq %r13
movl 0x8(%rbx), %eax
cmpq %rax, %r13
jb 0x4c91
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ReadInSenderOTsFSM2(std::basic_ifstream<char, std::char_traits<char>>&, ProtocolArgs)
SenderOTCorrelation** ReadInSenderOTsFSM2(ifstream &in, struct ProtocolArgs args)
{
  SenderOTCorrelation** FSM2 = new SenderOTCorrelation*[args.FSM2_rounds];
  for (int i = 0; i < args.FSM2_rounds; i++)
  {
    FSM2[i] = new SenderOTCorrelation(in, bits_FSM2_SOT);
  }
  return FSM2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0xc(%rsi), %r12d
leaq (,%r12,8), %rdi
callq 0x2030
movq %rax, %r15
testq %r12, %r12
je 0x4d34
xorl %r13d, %r13d
movl $0x130, %edi            # imm = 0x130
callq 0x2250
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x3ad6
movq %r12, (%r15,%r13,8)
incq %r13
movl 0xc(%rbx), %eax
cmpq %rax, %r13
jb 0x4d08
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ReadInReceiverOTsFSM1(std::basic_ifstream<char, std::char_traits<char>>&, ProtocolArgs)
ReceiverOTCorrelation** ReadInReceiverOTsFSM1(ifstream &in, struct ProtocolArgs args)
{
  args.alloc_OT = true;
  ReceiverOTCorrelation** FSM1 = new ReceiverOTCorrelation *[args.FSM1_rounds];
  for (int i = 0; i < args.FSM1_rounds; i++)
  {
    FSM1[i] = new ReceiverOTCorrelation(in, bits_FSM1);
  }
  return FSM1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, 0x28(%rsi)
movl 0x8(%rsi), %r12d
leaq (,%r12,8), %rdi
callq 0x2030
movq %rax, %r15
testq %r12, %r12
je 0x4daf
xorl %r13d, %r13d
movl $0x130, %edi            # imm = 0x130
callq 0x2250
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x3c38
movq %r12, (%r15,%r13,8)
incq %r13
movl 0x8(%rbx), %eax
cmpq %rax, %r13
jb 0x4d83
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ReadInReceiverOTsFSM2(std::basic_ifstream<char, std::char_traits<char>>&, ProtocolArgs)
ReceiverOTCorrelation** ReadInReceiverOTsFSM2(ifstream &in, struct ProtocolArgs args)
{
  args.alloc_OT = true;
  ReceiverOTCorrelation** FSM2 = new ReceiverOTCorrelation *[args.FSM2_rounds];
  for (int i = 0; i < args.FSM2_rounds; i++)
  {
    FSM2[i] = new ReceiverOTCorrelation(in, bits_FSM2);
  }
  return FSM2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, 0x28(%rsi)
movl 0xc(%rsi), %r12d
leaq (,%r12,8), %rdi
callq 0x2030
movq %rax, %r15
testq %r12, %r12
je 0x4e2a
xorl %r13d, %r13d
movl $0x130, %edi            # imm = 0x130
callq 0x2250
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movl $0x6, %edx
callq 0x3c38
movq %r12, (%r15,%r13,8)
incq %r13
movl 0xc(%rbx), %eax
cmpq %rax, %r13
jb 0x4dfe
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ReadInEntry(std::basic_ifstream<char, std::char_traits<char>>&, unsigned int)
uint32_t* ReadInEntry(ifstream& in, uint32_t C){
  string line;
  getline(in, line, '\n');

  istringstream f(line);
  string element;

  uint32_t* entry = new uint32_t[C];
  uint32_t i = 0;

  while (getline(f, element, ',')){
    entry[i] = (uint32_t) atoi(element.c_str());
    i += 1;
  }

  return entry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %esi, %ebx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x2440
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x23b0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movl %ebx, %edi
shlq $0x2, %rdi
callq 0x2030
movq %rax, %rbx
xorl %ebp, %ebp
leaq 0x48(%rsp), %r14
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0x2c, %edx
callq 0x2440
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movq 0x28(%rsp), %rdi
jne 0x4f0f
callq 0x2370
movl %ebp, %ecx
movl %eax, (%rbx,%rcx,4)
incl %ebp
jmp 0x4ede
cmpq %r13, %rdi
je 0x4f19
callq 0x2210
movq 0x40b0(%rip), %rsi      # 0x8fd0
leaq 0x48(%rsp), %rdi
callq 0x2340
leaq 0xc0(%rsp), %rdi
callq 0x20e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4f46
callq 0x2210
movq %rbx, %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4f64
jmp 0x4f5f
movq %rax, %rbx
jmp 0x4f94
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4f76
callq 0x2210
movq 0x4053(%rip), %rsi      # 0x8fd0
leaq 0x48(%rsp), %rdi
callq 0x2340
leaq 0xc0(%rsp), %rdi
callq 0x20e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4fa3
callq 0x2210
movq %rbx, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ReadInDB(std::basic_ifstream<char, std::char_traits<char>>&, unsigned int, unsigned int)
uint32_t** ReadInDB(ifstream& in, uint32_t N, uint32_t C){
  uint32_t **db = new uint32_t *[N];
  for (int i = 0; i < N; i++)
  {
    db[i] = ReadInEntry(in, C);
  }
  return db;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %r12d
leaq (,%r12,8), %rdi
callq 0x2030
movq %rax, %r15
testl %ebp, %ebp
je 0x4fed
xorl %r13d, %r13d
movq %r14, %rdi
movl %ebx, %esi
callq 0x4e60
movq %rax, (%r15,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x4fd7
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: SendLargePacked(CSocket*, unsigned char, unsigned long, unsigned char*)
void SendLargePacked(CSocket* socket, uint8_t bitsPerMsg, uint64_t length, uint8_t* data){
  //Assumes bitsPerMsg <= 8
  uint64_t newLength = packLength(length, bitsPerMsg);
  uint8_t* buffer = new uint8_t[newLength];
  memset(buffer, 0, newLength);
  
  uint8_t bitPointer = 0;
  uint64_t index = 0;

  for (int i = 0; i < length; i++){
    if (bitPointer + bitsPerMsg <= 8){
      buffer[index] += data[i] << bitPointer;
      bitPointer += bitsPerMsg;
      if (bitPointer == 8){
        index += 1;
        bitPointer = 0;
      }
    }
    else{
      uint8_t rightBits = 8 - bitPointer;
      uint8_t mask = (1 << rightBits) - 1;
      buffer[index] += (data[i] & mask) << bitPointer;
      
      index += 1;
      buffer[index] =  data[i] >> rightBits;
      bitPointer = bitsPerMsg - rightBits;
    }
  }

#if LOGGING
  struct timespec start, stop;
  uint64_t duration;
  clock_gettime(CLOCK_REALTIME, &start);
#endif

  socket->SendLarge(buffer, newLength);

#if LOGGING
  clock_gettime(CLOCK_REALTIME, &stop);
  duration = (stop.tv_sec - start.tv_sec) * BILLION + stop.tv_nsec - start.tv_nsec;
  cout << "Time to send: " << duration << " ns with size: " << newLength << endl;
#endif
  
  delete[] buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, (%rsp)
movl %esi, %ebx
imulq %rdx, %rbx
addq $0x7, %rbx
shrq $0x3, %rbx
movq %rbx, %rdi
callq 0x2030
movq %rax, %r13
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2140
testq %r12, %r12
je 0x50b4
movzbl %bpl, %eax
xorl %ecx, %ecx
xorl %esi, %esi
xorl %edx, %edx
movzbl %sil, %edi
addl %eax, %edi
cmpl $0x8, %edi
ja 0x507c
movzbl (%r14,%rcx), %r8d
shlxl %esi, %r8d, %esi
addb %sil, (%r13,%rdx)
xorl %esi, %esi
cmpl $0x8, %edi
sete %sil
cmovel %r15d, %edi
addq %rsi, %rdx
movl %edi, %esi
jmp 0x50ac
movl $0x8, %edi
subl %esi, %edi
movzbl %dil, %edi
movzbl (%r14,%rcx), %r8d
bzhil %edi, %r8d, %r9d
shlxl %esi, %r9d, %esi
addb %sil, (%r13,%rdx)
shrxl %edi, %r8d, %esi
movb %sil, 0x1(%r13,%rdx)
incq %rdx
movl %eax, %esi
subl %edi, %esi
incq %rcx
cmpq %rcx, %r12
jne 0x504e
movq (%rsp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x541e
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2300
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ReceiveLargePacked(CSocket*, unsigned char, unsigned long, unsigned char*)
void ReceiveLargePacked(CSocket* socket, uint8_t bitsPerMsg, uint64_t length, uint8_t* out){
  //Assumes bitsPerMsg <= 8
  uint64_t newLength = packLength(length, bitsPerMsg);
  uint8_t* buffer = new uint8_t[newLength];

#if LOGGING
  struct timespec start, stop;
  uint64_t duration;
  clock_gettime(CLOCK_REALTIME, &start);
#endif

  socket->ReceiveLarge(buffer, newLength);

#if LOGGING
  clock_gettime(CLOCK_REALTIME, &stop);
  duration = (stop.tv_sec - start.tv_sec) * BILLION + stop.tv_nsec - start.tv_nsec;
  cout << "Time to receive: " << duration << " ns with size: " << newLength << endl;
#endif
  
  uint8_t bitPointer = 0;
  uint64_t index = 0;

  uint8_t mask = (1 << bitsPerMsg) - 1;

  for (int i = 0; i < length; i++){
    if (bitPointer + bitsPerMsg <= 8){
      //REGULAR CASE
      out[i] = (buffer[index] >> bitPointer) & mask;
      bitPointer += bitsPerMsg;
      if (bitPointer == 8){
        index += 1;
        bitPointer = 0;
      }
    }
    else{
      //OVERLAP CASE
      uint8_t reconstructedValue = 0;

      uint8_t rightBits = 8 - bitPointer;
      reconstructedValue += buffer[index] >> bitPointer;

      index += 1;
      uint8_t leftBits = bitsPerMsg - rightBits;
      uint8_t newMask = (1 << leftBits) - 1;
      reconstructedValue += (buffer[index] & newMask) << rightBits;
      out[i] = reconstructedValue;

      bitPointer = leftBits;
    }
  }
  delete[] buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r12
movl %esi, %r13d
imulq %rdx, %r13
addq $0x7, %r13
shrq $0x3, %r13
movq %r13, %rdi
callq 0x2030
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x536c
testq %r14, %r14
je 0x51a5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shlxl %ebp, %eax, %eax
notl %eax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %edi, %edi
xorl %esi, %esi
movzbl %dil, %r8d
addl %ebp, %r8d
cmpl $0x8, %r8d
ja 0x5167
movzbl (%r15,%rsi), %r9d
shrxl %edi, %r9d, %edi
andl %eax, %edi
movb %dil, (%rbx,%rdx)
xorl %edi, %edi
cmpl $0x8, %r8d
sete %dil
cmovel %ecx, %r8d
addq %rdi, %rsi
movl %r8d, %edi
jmp 0x519d
movl $0x8, %r8d
subl %edi, %r8d
movzbl (%r15,%rsi), %r9d
shrxl %edi, %r9d, %r9d
movzbl %r8b, %r8d
movl %ebp, %edi
subl %r8d, %edi
movzbl 0x1(%r15,%rsi), %r10d
incq %rsi
bzhil %edi, %r10d, %r10d
shlxl %r8d, %r10d, %r8d
addl %r9d, %r8d
movb %r8b, (%rbx,%rdx)
incq %rdx
cmpq %rdx, %r14
jne 0x5134
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/./socket.h
// Function: CSocket::Bind(unsigned short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
uint8_t Bind(uint16_t nPort=0, string ip = "") {
    // Bind the socket to its port
    sockaddr_in sockAddr;
    memset(&sockAddr,0,sizeof(sockAddr));
    sockAddr.sin_family = AF_INET;

    if( ip != "" ) {
      int on = 1;
      setsockopt(m_hSock, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(on));

      sockAddr.sin_addr.s_addr = inet_addr(ip.c_str());

      if (sockAddr.sin_addr.s_addr == INADDR_NONE) {
        hostent* phost;
        phost = gethostbyname(ip.c_str());
        if (phost != NULL) {
          sockAddr.sin_addr.s_addr = ((in_addr*)phost->h_addr)->s_addr;
        }
        else {
          return 0;
        }
      }
    }
    else {
      sockAddr.sin_addr.s_addr = htonl(INADDR_ANY);
    }
    
    sockAddr.sin_port = htons(nPort);

    return ::bind(m_hSock, (sockaddr *) &sockAddr, sizeof(sockaddr_in)) >= 0; 
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
movw $0x2, (%rsp)
leaq 0xf48(%rip), %rsi       # 0x612a
movq %rdx, %rdi
callq 0x20b0
testl %eax, %eax
je 0x523d
leaq 0x1c(%rsp), %rcx
movl $0x1, (%rcx)
movl (%rbx), %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x2410
movq (%r14), %rdi
callq 0x2260
movl %eax, 0x4(%rsp)
cmpl $-0x1, %eax
jne 0x5245
movq (%r14), %rdi
callq 0x22b0
testq %rax, %rax
je 0x5268
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0x5245
movl $0x0, 0x4(%rsp)
movq %rsp, %rsi
movbew %bp, 0x2(%rsi)
movl (%rbx), %edi
movl $0x10, %edx
callq 0x2070
testl %eax, %eax
setns %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
jmp 0x525f
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/./socket.h
// Function: CSocket::Connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned short, int)
uint8_t Connect(string ip, uint16_t port, int32_t lTOSMilisec = -1) {
    sockaddr_in sockAddr;
    memset(&sockAddr,0,sizeof(sockAddr));
    sockAddr.sin_family = AF_INET;
    sockAddr.sin_addr.s_addr = inet_addr(ip.c_str());

    if (sockAddr.sin_addr.s_addr == INADDR_NONE) {
      hostent* lphost;
      lphost = gethostbyname(ip.c_str());
      if (lphost != NULL) {
        sockAddr.sin_addr.s_addr = ((in_addr*)lphost->h_addr)->s_addr;
      }
      else {
        return 0;
      }
    }

    sockAddr.sin_port = htons(port);
  
    timeval tv;
    socklen_t len;
    
    if (lTOSMilisec > 0) {
      tv.tv_sec = lTOSMilisec/1000;
      tv.tv_usec = (lTOSMilisec%1000)*1000;
  
      setsockopt(m_hSock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
    }

    int ret = connect(m_hSock, (sockaddr*)&sockAddr, sizeof(sockAddr));
    
    if (ret >= 0 && lTOSMilisec > 0) {
      tv.tv_sec = 100000; 
      tv.tv_usec = 0;

      setsockopt(m_hSock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
    }

    return ret >= 0;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
movw $0x2, (%rsp)
movq (%rsi), %rdi
callq 0x2260
movl %eax, 0x4(%rsp)
cmpl $-0x1, %eax
jne 0x52bf
movq (%r15), %rdi
callq 0x22b0
testq %rax, %rax
je 0x5367
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movbew %r14w, 0x2(%rsp)
testl %ebp, %ebp
jle 0x530b
movl %ebp, %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %ebp, %edx
subl %eax, %edx
imull $0x3e8, %edx, %eax      # imm = 0x3E8
movq %rax, 0x8(%rcx)
movl (%rbx), %edi
movl $0x1, %esi
movl $0x14, %edx
movl $0x10, %r8d
callq 0x2410
testl %ebp, %ebp
setle %r14b
movl (%rbx), %edi
movq %rsp, %rsi
movl $0x10, %edx
callq 0x21c0
movl %eax, %ebp
testl %eax, %eax
sets %al
orb %r14b, %al
jne 0x5357
leaq 0x18(%rsp), %rcx
movq $0x186a0, (%rcx)        # imm = 0x186A0
movq $0x0, 0x8(%rcx)
movl (%rbx), %edi
movl $0x1, %esi
movl $0x14, %edx
movl $0x10, %r8d
callq 0x2410
testl %ebp, %ebp
setns %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x535c
nop
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/./socket.h
// Function: CSocket::ReceiveLarge(unsigned char*, unsigned long)
void ReceiveLarge(uint8_t* pBuf, uint64_t len) {
    int nBatches = (len + BLK_SIZE - 1) / BLK_SIZE;
    for (int i = 0; i < nBatches; i++) {
      int batchSize = BLK_SIZE;
      if (i == nBatches - 1) {
        batchSize = len % BLK_SIZE;
        if (batchSize == 0) {
          batchSize = BLK_SIZE;
        }
      }
      Receive(pBuf + i * BLK_SIZE, batchSize);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rax
leaq 0x7ffffffe(%rdx), %r14
movabsq $0x200000005, %rcx      # imm = 0x200000005
movq %r14, %rdx
mulxq %rcx, %rdx, %rdx
subq %rdx, %r14
shrq %r14
addq %rdx, %r14
shrq $0x1e, %r14
testl %r14d, %r14d
jle 0x540e
movq %rsi, %rbx
movq %rdi, %r15
leal -0x1(%r14), %r12d
movq %rax, %rdx
mulxq %rcx, %rcx, %rcx
movq %rax, %r13
subq %rcx, %r13
shrq %r13
addq %rcx, %r13
shrq $0x1e, %r13
movq %r13, %rcx
shlq $0x1f, %rcx
subq %rcx, %r13
addq %rax, %r13
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmovel %eax, %r13d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %ebp, %ebp
cmpq %rbp, %r12
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmovel %r13d, %edx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x54d0
incq %rbp
addq $0x7fffffff, %rbx       # imm = 0x7FFFFFFF
cmpq %rbp, %r14
jne 0x53e6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/./socket.h
// Function: CSocket::SendLarge(unsigned char const*, unsigned long)
void SendLarge(const uint8_t* pBuf, uint64_t len) {
    int nBatches = (len + BLK_SIZE - 1) / BLK_SIZE;
    for (int i = 0; i < nBatches; i++) {
      int batchSize = BLK_SIZE;
      if (i == nBatches - 1) {
        batchSize = len % BLK_SIZE;
        if (batchSize == 0) {
          batchSize = BLK_SIZE;
        }
      }
      Send(pBuf + i * BLK_SIZE, batchSize);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rax
leaq 0x7ffffffe(%rdx), %r14
movabsq $0x200000005, %rcx      # imm = 0x200000005
movq %r14, %rdx
mulxq %rcx, %rdx, %rdx
subq %rdx, %r14
shrq %r14
addq %rdx, %r14
shrq $0x1e, %r14
testl %r14d, %r14d
jle 0x54c0
movq %rsi, %rbx
movq %rdi, %r15
leal -0x1(%r14), %r12d
movq %rax, %rdx
mulxq %rcx, %rcx, %rcx
movq %rax, %r13
subq %rcx, %r13
shrq %r13
addq %rcx, %r13
shrq $0x1e, %r13
movq %r13, %rcx
shlq $0x1f, %rcx
subq %rcx, %r13
addq %rax, %r13
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmovel %eax, %r13d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %ebp, %ebp
cmpq %rbp, %r12
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmovel %r13d, %edx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x5686
incq %rbp
addq $0x7fffffff, %rbx       # imm = 0x7FFFFFFF
cmpq %rbp, %r14
jne 0x5498
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/./socket.h
// Function: CSocket::Send(void const*, int, int)
int Send(const void* pBuf, int nLen, int nFlags = 0) {
    struct timespec start, stop;
    
    clock_gettime( CLOCK_REALTIME, &start);

    bytesSent += nLen;
    int ret = send(m_hSock, (char*)pBuf, nLen, nFlags);

    clock_gettime( CLOCK_REALTIME, &stop);
    networkTime += (stop.tv_sec - start.tv_sec) * BILLION + stop.tv_nsec - start.tv_nsec;

    return ret;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
xorl %edi, %edi
movq %r12, %rsi
callq 0x21f0
movslq %r14d, %rdx
addq %rdx, 0x8(%rbx)
movl (%rbx), %edi
movq %r15, %rsi
movl %ebp, %ecx
callq 0x2130
movq %rax, %r14
movq %rsp, %r15
xorl %edi, %edi
movq %r15, %rsi
callq 0x21f0
movq (%r15), %rax
subq (%r12), %rax
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
addq 0x8(%r15), %rax
subq 0x8(%r12), %rax
addq %rax, 0x18(%rbx)
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/util.cpp
// Function: AESContext::FillBuffer(unsigned char*, unsigned int, unsigned long) const
void AESContext::FillBuffer(uint8_t* buf, uint32_t len, uint64_t tag) const {
  uint32_t nBlocks = len / sizeof(block);
  uint32_t bytesRemaining = len % sizeof(block);

  GetBlocks((block*) buf, nBlocks, tag);
  if (bytesRemaining != 0) {
    block lastBlock;
    GetBlock(lastBlock, tag, nBlocks);

    memcpy(buf + nBlocks * sizeof(block), &lastBlock, bytesRemaining);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
shrl $0x4, %r12d
movl %r12d, %edx
callq 0x5b50
andl $0xf, %ebp
je 0x5cbf
movl %r12d, %eax
vmovq %r15, %xmm0
vmovq %rax, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovdqa %xmm0, (%rsp)
movl 0xf0(%r14), %ecx
vpxor (%r14), %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
movl $0x1, %edx
cmpq $0x2, %rcx
jb 0x5c9a
movq %rcx, %rdx
shlq $0x4, %rdx
movl $0x10, %esi
vaesenc (%r14,%rsi), %xmm0, %xmm0
addq $0x10, %rsi
cmpq %rsi, %rdx
jne 0x5c83
vmovdqa %xmm0, (%rsp)
movq %rcx, %rdx
movq %rsp, %rsi
vmovdqa (%rsi), %xmm0
shlq $0x4, %rdx
vaesenclast (%r14,%rdx), %xmm0, %xmm0
vmovdqa %xmm0, (%rsi)
shll $0x4, %eax
addq %rax, %rbx
movl %ebp, %edx
movq %rbx, %rdi
callq 0x21b0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/superblocks[P]superblocks/set-cdc.cpp
// Function: Superblocks::init()
void Superblocks::init() {

  coin = "CDC"; 
	coin_name = "Cloudcoin";

	hash_length = 64;

	// normal (step 0)
	reward[0] = 50;

	// superblocks

	seed_type[1] = SEED_WITH_PREVIOUS_BLOCK_HASH;
	cutout_start[1] = 6;
	cutout_length[1] = 7;
	rnd_range_low[1] = 1;
	rnd_range_high[1] = 14400;
	luck_type[1] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[1] = 10000;
	luck_y[1] = 10011;
	reward[1] = 4400;

	luck_type[2] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[2] = 2000;
	luck_y[2] = 2031;
	reward[2] = 900;

	luck_type[3] = LUCK_WITH_MORE_THAN_X_AND_LESS_THAN_Y;
	luck_x[3] = 8000;
	luck_y[3] = 8101;
	reward[3] = 400;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
movq 0x20(%rbx), %rdx
leaq 0x18f8(%rip), %rcx      # 0x3b00
movl $0x3, %r8d
xorl %esi, %esi
callq 0x1130
leaq 0x38(%rbx), %rdi
movq 0x40(%rbx), %rdx
leaq 0x18e0(%rip), %rcx      # 0x3b04
movl $0x9, %r8d
xorl %esi, %esi
callq 0x1130
movl $0x40, 0x58(%rbx)
movabsq $0x113000000032, %rax   # imm = 0x113000000032
movq %rax, 0x14c(%rbx)
movl $0x2, 0x60(%rbx)
movl $0x6, 0x70(%rbx)
movl $0x7, 0x80(%rbx)
movl $0x1, 0x90(%rbx)
movl $0x3840, 0xa0(%rbx)     # imm = 0x3840
movl $0x3, 0x120(%rbx)
movl $0x2710, 0x130(%rbx)    # imm = 0x2710
movl $0x271b, 0x140(%rbx)    # imm = 0x271B
movabsq $0x300000003, %rax      # imm = 0x300000003
movq %rax, 0x124(%rbx)
movabsq $0x1f40000007d0, %rax   # imm = 0x1F40000007D0
movq %rax, 0x134(%rbx)
movabsq $0x1fa5000007ef, %rax   # imm = 0x1FA5000007EF
movq %rax, 0x144(%rbx)
movabsq $0x19000000384, %rax    # imm = 0x19000000384
movq %rax, 0x154(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gty980218[P]ee450/hospitalC.cpp
// Function: main
int main(int argc, char *argv[]){
    if(argc!=4){
        fprintf(stderr,"Missing location,capacity or occupancy parameters!\n");
        exit(1);
    }

    int size=indice_map.size();
    Hospital hospital(atoi(argv[2]),atoi(argv[3]),init(atoi(argv[1])),atoi(argv[1]));
    //create socket 
	int sock;
	if((sock = socket(PF_INET, SOCK_DGRAM, 0)) < 0){
        fprintf(stderr,"Create socket failed!\n");
        exit(1);
    }                                                       //SOCK_DGRAM for UDP
	//initialize address
	struct  sockaddr_in servaddr;
	memset(&servaddr, 0, sizeof(servaddr));
	servaddr.sin_family = AF_INET;                          //use IPv4
	servaddr.sin_port = htons(32188);
	servaddr.sin_addr.s_addr = htonl(INADDR_ANY);           //0.0.0.0 stands for all IPs in local host,listening all NIC's ports 
    //bind
	if(bind(sock, (struct sockaddr*)& servaddr, sizeof(servaddr)) < 0){
        fprintf(stderr,"Binding failed,check the availability of port!\n");
        exit(1);
    }
    //send initialized occpation and capacity
    ready(sock,hospital);
    //waiting for client
    serve(sock,hospital);
    close(sock);
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
cmpl $0x4, %edi
jne 0x2553
movq %rsi, %rbx
movq 0x10(%rsi), %rdi
callq 0x2290
movl %eax, %r14d
movq 0x18(%rbx), %rdi
callq 0x2290
movl %eax, %r15d
movq 0x8(%rbx), %rdi
callq 0x2290
movl %eax, %edi
callq 0x25d1
movq %rax, %r12
movq 0x8(%rbx), %rdi
callq 0x2290
movl %r14d, -0x38(%rbp)
movl %r15d, -0x34(%rbp)
movq %r12, -0x28(%rbp)
movl %eax, -0x30(%rbp)
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x20a0
testl %eax, %eax
jns 0x257d
movq 0x3a96(%rip), %rax      # 0x5fd8
movq (%rax), %rcx
leaq 0x1b10(%rip), %rdi      # 0x405c
movl $0x16, %esi
jmp 0x2569
movq 0x3a7e(%rip), %rax      # 0x5fd8
movq (%rax), %rcx
leaq 0x1ac4(%rip), %rdi      # 0x4028
movl $0x33, %esi
movl $0x1, %edx
callq 0x2320
movl $0x1, %edi
callq 0x2240
movl %eax, %ebx
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rsi
movaps %xmm0, (%rsi)
movl $0xbc7d0002, %eax       # imm = 0xBC7D0002
movq %rax, (%rsi)
movl %ebx, %edi
movl $0x10, %edx
callq 0x2060
testl %eax, %eax
jns 0x25b9
movq 0x3a30(%rip), %rax      # 0x5fd8
movq (%rax), %rcx
leaq 0x1ac1(%rip), %rdi      # 0x4073
movl $0x2f, %esi
jmp 0x2569
leaq -0x38(%rbp), %r14
movl %ebx, %edi
movq %r14, %rsi
callq 0x2813
movl %ebx, %edi
movq %r14, %rsi
callq 0x2a7e
// File: /workspace/github_cpp_makefile_star2_O1/gty980218[P]ee450/hospitalC.cpp
// Function: Hospital::Hospital(int, int, Dist_list*, int)
Hospital::Hospital(int capacity,int occupancy,Dist_list *dist_list,int location){
    this->capacity=capacity;
    this->occupancy=occupancy;
    this->dist_list=dist_list;
    this->location=location;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movq %rcx, 0x10(%rdi)
movl %r8d, 0x8(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/ServerInfo.cpp
// Function: ServerInfo::setServer(int, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void	ServerInfo::setServer(int nb, int const &pos, std::string const &buf)
{
	typedef void (ServerInfo::*MemFuncPtr)(const char*);
	MemFuncPtr F[] = { &ServerInfo::setPort, &ServerInfo::setError, &ServerInfo::setNames, 
                        &ServerInfo::setMaxClientsBS, &ServerInfo::setHost };
                        
    const char *tmp = buf.c_str() + pos;
	int i = 0;

	while (isspace(tmp[i]))
        i++;
    
	(this->*F[nb])(tmp + i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %esi, %r15d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x30(%rbp)
leaq 0x7d(%rip), %rax        # 0x5c7a
movq %rax, -0x70(%rbp)
leaq 0x2ca(%rip), %rax       # 0x5ed2
movq %rax, -0x60(%rbp)
leaq 0x43b(%rip), %rax       # 0x604e
movq %rax, -0x50(%rbp)
leaq 0x444(%rip), %rax       # 0x6062
movq %rax, -0x40(%rbp)
leaq 0x691(%rip), %rax       # 0x62ba
movq %rax, -0x30(%rbp)
movq (%rcx), %rax
movslq (%rdx), %rcx
leaq (%rcx,%rax), %r14
decq %r14
movsbl 0x1(%r14), %edi
incq %r14
callq 0x4060
testl %eax, %eax
jne 0x5c3a
movslq %r15d, %rcx
shlq $0x4, %rcx
movq -0x70(%rbp,%rcx), %rax
addq -0x68(%rbp,%rcx), %rbx
testb $0x1, %al
je 0x5c68
movq (%rbx), %rcx
movq -0x1(%rcx,%rax), %rax
movq %rbx, %rdi
movq %r14, %rsi
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/FileParser.cpp
// Function: FileParser::FileParser(char const*, bool)
FileParser::FileParser(const char *filepath, bool s) : _bracket(0), _cli_srv(0), _filePath(filepath)
{
	#if DEBUG
		std::cout << "FileParser object trying to read file at path :|" << filepath << "|\n";
	#endif
	
	_file.open(filepath);
	parseRequestFile();
	(void)s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4450
leaq 0x218(%rbx), %r13
movq %r13, 0x208(%rbx)
xorl %eax, %eax
movq %rax, 0x210(%rbx)
movb %al, 0x218(%rbx)
movl %eax, 0x228(%rbx)
leaq 0x238(%rbx), %rcx
movl %eax, 0x238(%rbx)
movq %rax, 0x240(%rbx)
movq %rcx, 0x248(%rbx)
movq %rcx, 0x250(%rbx)
movq %rax, 0x258(%rbx)
leaq 0x268(%rbx), %rcx
movl %eax, 0x268(%rbx)
movq %rax, 0x270(%rbx)
movq %rcx, 0x278(%rbx)
movq %rcx, 0x280(%rbx)
movq %rax, 0x288(%rbx)
leaq 0x2a0(%rbx), %r15
movq %r15, 0x290(%rbx)
movq %rax, 0x298(%rbx)
movb %al, 0x2a0(%rbx)
movq %rax, 0x2b0(%rbx)
leaq 0x2b8(%rbx), %rdi
leaq -0x29(%rbp), %rdx
movq %r14, %rsi
callq 0x518a
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x4270
movq %rbx, %rdi
callq 0x6c00
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, -0x38(%rbp)
jmp 0x6ba1
movq %rax, -0x38(%rbp)
movq 0x2b8(%rbx), %rdi
leaq 0x2c8(%rbx), %rax
cmpq %rax, %rdi
je 0x6ba1
movq (%rax), %rsi
incq %rsi
callq 0x43e0
leaq 0x230(%rbx), %r14
leaq 0x260(%rbx), %r12
movq 0x290(%rbx), %rdi
cmpq %r15, %rdi
je 0x6bc6
movq (%r15), %rsi
incq %rsi
callq 0x43e0
movq %r12, %rdi
callq 0x678a
movq %r14, %rdi
callq 0x5778
movq 0x208(%rbx), %rdi
cmpq %r13, %rdi
je 0x6bee
movq (%r13), %rsi
incq %rsi
callq 0x43e0
movq %rbx, %rdi
callq 0x4100
movq -0x38(%rbp), %rdi
callq 0x46d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/FileParser.cpp
// Function: FileParser::parseConfigFile()
void FileParser::parseConfigFile()
{
	// loop for each block server if there is something else, throw an error
	while (std::getline(_file, _buf)){
		
		if (!_buf.compare(0, 9, "server {")){
			_bracket = 0;
			bracketRegulator(_bracket, _buf);
			newServer();
		}
		else if (!_buf.compare(0, 1, "}") || !_buf.compare(0, 2, ""))
			continue;
		else throw std::runtime_error(errParseMessage("error line : ", _buf.c_str(), " not a good name for server block\n")); // ERREUR 
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x208(%rdi), %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x43b0
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4740
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x7133
leaq 0x228(%r14), %r15
leaq 0xe093(%rip), %r12      # 0x15125
leaq 0xe095(%rip), %r13      # 0x1512e
movl $0x9, %edx
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x4510
testl %eax, %eax
je 0x70e1
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rcx
callq 0x4510
testl %eax, %eax
je 0x70ff
movl $0x2, %edx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0xe62b(%rip), %rcx      # 0x15701
callq 0x4510
testl %eax, %eax
je 0x70ff
jmp 0x7142
movl $0x0, 0x228(%r14)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9f09
movq %r14, %rdi
callq 0x71b6
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x43b0
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4740
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x7099
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x41f0
movq %rax, %r14
movq (%rbx), %rsi
leaq 0xdfd7(%rip), %rdi      # 0x15130
leaq 0xdfde(%rip), %rdx      # 0x1513e
callq 0x9f70
movq %r14, %rdi
movq %rax, %rsi
callq 0x4620
movq 0x15e71(%rip), %rsi     # 0x1cfe8
movq 0x15e3a(%rip), %rdx     # 0x1cfb8
movq %r14, %rdi
callq 0x46a0
movq %rax, %rbx
movq %r14, %rdi
callq 0x42e0
movq %rbx, %rdi
callq 0x46d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/FileParser.cpp
// Function: FileParser::addNewLocationToMap(Location*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void FileParser::addNewLocationToMap(Location *loc, std::string const &name)
{
	std::map<std::string, Location>::iterator it = _m_loc.find(name);
	
	if (it == _m_loc.end())
		_m_loc.insert(std::pair<std::string, Location>(name, *loc));
	else
		throw std::runtime_error(errParseMessage("Error : location ", name.c_str(), " already exist\n"));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x260(%rdi), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x85e0
addq $0x268, %r12            # imm = 0x268
cmpq %r12, %rax
jne 0x793b
leaq -0x108(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7bac
movq %rbx, %rdi
movq %r12, %rsi
callq 0x867e
leaq -0xe8(%rbp), %rbx
movq %rbx, %rdi
callq 0x8b9e
movq -0x20(%rbx), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x792b
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x43e0
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x41f0
movq %rax, %rbx
movq (%r14), %rsi
leaq 0xd8b3(%rip), %rdi      # 0x15205
leaq 0xd8be(%rip), %rdx      # 0x15217
callq 0x9f70
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4620
movq 0x15678(%rip), %rsi     # 0x1cfe8
movq 0x15641(%rip), %rdx     # 0x1cfb8
movq %rbx, %rdi
callq 0x46a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x42e0
jmp 0x799b
movq %rax, %r14
leaq -0x108(%rbp), %rdi
callq 0x7c0a
movq %r14, %rdi
callq 0x46d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/FileParser.cpp
// Function: FileParser::addNewServerToMap(ServerInfo&)
void FileParser::addNewServerToMap(ServerInfo &srv)
{
	int s_port = srv.getPort();
	srv.setSrvLocation()->insert(_m_loc.begin(), _m_loc.end());
	std::map<int, std::vector<ServerInfo> >::iterator it = _m_srv.find(s_port);
		
	if (it == _m_srv.end()){
		std::vector<ServerInfo> v_srv(1, srv);
		_m_srv.insert(std::pair<int, std::vector<ServerInfo> >(s_port, v_srv));
	}
	else
		it->second.push_back(srv);
	_m_loc.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x5bae
movl (%rax), %r13d
movq %r14, %rdi
callq 0x62f8
movq 0x278(%rbx), %rsi
leaq 0x268(%rbx), %rdx
movq %rax, %rdi
callq 0x7e02
movq 0x240(%rbx), %rdx
leaq 0x238(%rbx), %rax
movq %rax, %rcx
testq %rdx, %rdx
je 0x7a15
movq %rax, %rcx
xorl %esi, %esi
cmpl %r13d, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x79fd
movq %rax, %rdi
cmpq %rax, %rcx
je 0x7a28
cmpl 0x20(%rcx), %r13d
cmovlq %rax, %rcx
movq %rcx, %rdi
cmpq %rax, %rdi
je 0x7a3b
addq $0x28, %rdi
movq %r14, %rsi
callq 0x7b6e
jmp 0x7a8a
leaq -0x40(%rbp), %r15
leaq -0x60(%rbp), %r12
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq %r12, %rcx
callq 0x7aca
movl %r13d, (%r12)
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x561a
leaq 0x230(%rbx), %rdi
leaq -0x60(%rbp), %rsi
callq 0x81b0
movq %r14, %rdi
callq 0x55c6
leaq -0x40(%rbp), %rdi
callq 0x55c6
addq $0x260, %rbx            # imm = 0x260
movq %rbx, %rdi
callq 0x85a8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x55c6
jmp 0x7ab8
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x55c6
movq %rbx, %rdi
callq 0x46d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/LocationObj.cpp
// Function: Location::setLocation(int, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void	Location::setLocation(int nb, int const &pos, std::string const &buf)
{
	typedef void (Location::*MemFuncPtr)(const char*);
	MemFuncPtr F[] = { &Location::setMethods, &Location::setIndex,
						&Location::setUploadStore, &Location::setRoot, &Location::setCgiExe, 
						&Location::setAutoIndex, &Location::setRedirect};

	const char *tmp = buf.c_str() + pos;
	int i = 0;

	while (isspace(tmp[i]))
		i++;

	(this->*F[nb])(tmp + i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movq (%rcx), %rax
movslq (%rdx), %rcx
leaq (%rcx,%rax), %r14
decq %r14
movsbl 0x1(%r14), %edi
incq %r14
callq 0x4060
testl %eax, %eax
jne 0x8c93
movslq %r15d, %rcx
shlq $0x4, %rcx
leaq 0x1404e(%rip), %rdx     # 0x1cd00
movq (%rcx,%rdx), %rax
addq 0x8(%rcx,%rdx), %rbx
testb $0x1, %al
je 0x8cc7
movq (%rbx), %rcx
movq -0x1(%rcx,%rax), %rax
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/LocationObj.cpp
// Function: Location::setMethods(char const*)
void Location::setMethods(char const *n) 
{
	_allow_methd.clear();
	setStringArray(n, _allow_methd);
	const char *method_checking[] = { "POST", "GET", "HEAD", "DELETE"};
	for (size_t i = 0; i < _allow_methd.size(); i++){
		for (size_t j = 0; j < 4; j++){
			if (!strcmp(method_checking[j], _allow_methd[i].c_str()))
				break;
			if (j == 4)
				throw std::runtime_error("Error : method " + std::string(_allow_methd[i]) + " is not accepted\n");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x68(%rdi), %rsi
leaq 0x68(%rdi), %r14
movq %r14, %rdi
callq 0x9c12
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xa123
nop
// File: /workspace/github_cpp_makefile_star2_O1/llefranc[P]42_webserv/srcs/parser/LocationObj.cpp
// Function: Location::setUploadStore(char const*)
void Location::setUploadStore(char const *u) 
{
	std::string cString = u;
	if (numberOfWords(u) != 1)
		throw std::runtime_error("Error : " + std::string(cString) + " - put only one upload_path input\n");
	_upload_path = *wsTrim(cString);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0x518a
movq %r14, %rdi
callq 0x9ffe
cmpq $0x1, %rax
jne 0x8d94
leaq -0x48(%rbp), %rdi
callq 0xa0c9
addq $0x28, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4240
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d82
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x41f0
movq %rax, %rbx
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x67a2
leaq 0xc2d6(%rip), %rsi      # 0x1509d
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0x51d5
leaq 0xc4a7(%rip), %rsi      # 0x15288
leaq -0xa8(%rbp), %rdi
callq 0x4760
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8e0e
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x8e19
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %r12b
movq %rbx, %rdi
callq 0x4620
xorl %r12d, %r12d
movq 0x1419f(%rip), %rsi     # 0x1cfe8
movq 0x14168(%rip), %rdx     # 0x1cfb8
movq %rbx, %rdi
callq 0x46a0
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x8e78
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x43e0
jmp 0x8e78
movq %rax, %r14
movb $0x1, %r12b
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8e9f
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x43e0
jmp 0x8e9f
movq %rax, %r14
movb $0x1, %r12b
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x8ebf
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x43e0
jmp 0x8ebf
movq %rax, %r14
movb $0x1, %r12b
testb %r12b, %r12b
je 0x8ed1
movq %rbx, %rdi
callq 0x42e0
jmp 0x8ed1
movq %rax, %r14
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8eea
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x43e0
movq %r14, %rdi
callq 0x46d0