LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: m1c0l[P]http-client-server/HttpMessage.cpp
// Function: HttpMessage::encode[abi:cxx11]()
string HttpMessage::encode() {
	string msg = "";
	msg += encodeFirstLine();
	for (auto header : m_headers) {
		msg += header.first + ": " + header.second + CRLF;
	}
	msg += CRLF;
	return msg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x110(%rbp)
movq %rdi, %rax
movq %rax, -0x120(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x12(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x5690
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rdx
leaq 0xd1f0(%rip), %rsi      # 0x13178
callq 0x6200
jmp 0x5f8f
leaq -0x12(%rbp), %rdi
callq 0x5480
movq -0x118(%rbp), %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq -0x48(%rbp), %rdi
callq *%rax
jmp 0x5fae
movq -0x110(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5550
jmp 0x5fc0
leaq -0x48(%rbp), %rdi
callq 0x5280
movq -0x118(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x62b0
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x62e0
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x6310
testb $0x1, %al
jne 0x6008
jmp 0x6173
leaq -0x58(%rbp), %rdi
callq 0x6340
movq %rax, %rsi
leaq -0xa0(%rbp), %rdi
callq 0x6370
jmp 0x6022
leaq 0xd186(%rip), %rdx      # 0x131af
leaq -0x100(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x6470
jmp 0x603e
leaq -0x80(%rbp), %rdx
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x6420
jmp 0x6057
leaq 0xd118(%rip), %rdx      # 0x13176
leaq -0xc0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x63d0
jmp 0x6073
movq -0x110(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x5550
jmp 0x6088
leaq -0xc0(%rbp), %rdi
callq 0x5280
leaq -0xe0(%rbp), %rdi
callq 0x5280
leaq -0x100(%rbp), %rdi
callq 0x5280
leaq -0xa0(%rbp), %rdi
callq 0x64f0
leaq -0x58(%rbp), %rdi
callq 0x6520
jmp 0x5ff2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x12(%rbp), %rdi
callq 0x5480
jmp 0x61ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x61ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5280
jmp 0x61ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x6165
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x6159
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x614d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x5280
leaq -0xe0(%rbp), %rdi
callq 0x5280
leaq -0x100(%rbp), %rdi
callq 0x5280
leaq -0xa0(%rbp), %rdi
callq 0x64f0
jmp 0x61ae
movq -0x110(%rbp), %rdi
leaq 0xcff5(%rip), %rsi      # 0x13176
callq 0x53e0
jmp 0x6188
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x619e
movq -0x110(%rbp), %rdi
callq 0x5280
movq -0x120(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x110(%rbp), %rdi
callq 0x5280
movq -0x20(%rbp), %rdi
callq 0x5680
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: m1c0l[P]http-client-server/HttpResponse.cpp
// Function: HttpResponse::decodeFirstLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int HttpResponse::decodeFirstLine(string line) {
	stringstream ss;
	ss << line;

	string version, status, description;
	ss >> version >> status;
	ss.ignore(1000, ' ');
	getline(ss, description);

	setVersion(version);
	setStatus(status);
	setDescription(description);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rsi, -0x270(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x52d0
movq -0x270(%rbp), %rsi
leaq -0x188(%rbp), %rdi
callq 0x5380
jmp 0x87c6
leaq -0x1c8(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0x55c0
leaq -0x1e8(%rbp), %rdi
callq 0x55c0
leaq -0x208(%rbp), %rdi
callq 0x55c0
movq -0x288(%rbp), %rsi
leaq -0x198(%rbp), %rdi
callq 0x5540
movq %rax, -0x280(%rbp)
jmp 0x880d
movq -0x280(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x5540
jmp 0x8822
leaq -0x198(%rbp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x20, %edx
callq 0x5290
jmp 0x883a
leaq -0x198(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x50b0
jmp 0x884f
leaq -0x228(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x51a0
jmp 0x8864
movq -0x278(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x58e0
jmp 0x8879
leaq -0x228(%rbp), %rdi
callq 0x5280
leaq -0x248(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x51a0
jmp 0x889a
movq -0x278(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x8a00
jmp 0x88af
leaq -0x248(%rbp), %rdi
callq 0x5280
leaq -0x268(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x51a0
jmp 0x88d0
movq -0x278(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x8a30
jmp 0x88e5
leaq -0x268(%rbp), %rdi
callq 0x5280
leaq -0x208(%rbp), %rdi
callq 0x5280
leaq -0x1e8(%rbp), %rdi
callq 0x5280
leaq -0x1c8(%rbp), %rdi
callq 0x5280
leaq -0x198(%rbp), %rdi
callq 0x5300
xorl %eax, %eax
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x89d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0x89b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x5280
jmp 0x89b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x5280
jmp 0x89b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x5280
leaq -0x208(%rbp), %rdi
callq 0x5280
leaq -0x1e8(%rbp), %rdi
callq 0x5280
leaq -0x1c8(%rbp), %rdi
callq 0x5280
leaq -0x198(%rbp), %rdi
callq 0x5300
movq -0x1a0(%rbp), %rdi
callq 0x5680
nopw %cs:(%rax,%rax)
// File: m1c0l[P]http-client-server/web-server.cpp
// Function: int waitFor<long>(std::future<long>&)
int waitFor(future<T>& promise) {
  chrono::seconds timer(timeout);

  if (promise.wait_for(timer) == future_status::timeout) {
    cerr << "Connection timed out.\n"; 
    return -1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x9735(%rip), %rax      # 0x137e8
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x10750
cmpl $0x1, %eax
jne 0xa0e5
movq 0x12f20(%rip), %rdi     # 0x1cff0
leaq 0x915b(%rip), %rsi      # 0x13232
callq 0x53f0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa0ec
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: jBlinden[P]private-codis/ProtocolClient.cpp
// Function: main
int main(int argc, const char **argv)
{
  if (argc < 5)
  {
    cout << "usage: ./ProtocolClient ProtocolArgsFile clientDataDir addr port" << endl;
    return 1;
  }

  srand(time(NULL));

  int port = atoi(argv[4]);

  string pArgsFile(argv[1]);
  string clientDataDir(argv[2]);

  StartClient(argv[3], port, pArgsFile, clientDataDir);
}

// Assembly:
subq $0xe8, %rsp
movl $0x0, 0xe4(%rsp)
movl %edi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
cmpl $0x5, 0xe0(%rsp)
jge 0x4eed
movq 0x8116(%rip), %rdi      # 0xcfd8
leaq 0x5262(%rip), %rsi      # 0xa12b
callq 0x32a0
movq %rax, %rdi
movq 0x80e8(%rip), %rsi      # 0xcfc0
callq 0x32f0
movl $0x1, 0xe4(%rsp)
jmp 0x5022
xorl %eax, %eax
movl %eax, %edi
callq 0x3260
movl %eax, %edi
callq 0x3280
movq 0xd8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x3410
movl %eax, 0xd4(%rsp)
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x3470
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
callq 0x33a0
jmp 0x4f51
leaq 0xaf(%rsp), %rdi
callq 0x3300
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x77(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3470
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x78(%rsp), %rdi
callq 0x33a0
jmp 0x4f94
leaq 0x77(%rsp), %rdi
callq 0x3300
movq 0xd8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, (%rsp)
movl 0xd4(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x3130
jmp 0x4fcd
leaq 0x30(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x3130
jmp 0x4fde
movl 0xc(%rsp), %esi
movq (%rsp), %rdi
leaq 0x50(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x4950
jmp 0x4ff7
leaq 0x30(%rsp), %rdi
callq 0x31a0
leaq 0x50(%rsp), %rdi
callq 0x31a0
leaq 0x78(%rsp), %rdi
callq 0x31a0
leaq 0xb0(%rsp), %rdi
callq 0x31a0
movl 0xe4(%rsp), %eax
addq $0xe8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xaf(%rsp), %rdi
callq 0x3300
jmp 0x50e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x77(%rsp), %rdi
callq 0x3300
jmp 0x50d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x50cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0x50c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x31a0
leaq 0x50(%rsp), %rdi
callq 0x31a0
leaq 0x78(%rsp), %rdi
callq 0x31a0
leaq 0xb0(%rsp), %rdi
callq 0x31a0
movq 0xa0(%rsp), %rdi
callq 0x3460
nop
// File: jBlinden[P]private-codis/./socket.h
// Function: CSocket::CSocket()
CSocket() { 
    m_hSock = INVALID_SOCKET;
    bytesSent = 0;
    bytesReceived = 0;
    networkTime = 0;
  }

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq $0x0, 0x8(%rax)
movq $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
retq
nopl (%rax)
// File: jBlinden[P]private-codis/./socket.h
// Function: CSocket::Close()
void Close() {
    if (m_hSock == INVALID_SOCKET) {
      return;
    }
    
    shutdown(m_hSock, SHUT_WR);
    close(m_hSock);
  
    m_hSock = INVALID_SOCKET; 
  }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $-0x1, (%rax)
jne 0x549a
jmp 0x54c2
movq 0x8(%rsp), %rax
movl (%rax), %edi
movl $0x1, %esi
callq 0x33b0
movq 0x8(%rsp), %rax
movl (%rax), %edi
callq 0x34c0
movq 0x8(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: Listen(CSocket*, int)
bool Listen(CSocket *socket, int port)
{
  if (!socket->Socket())
  {
    return false;
  }

  if (!socket->Bind((uint16_t)port))
  {
    return false;
  }

  if (!socket->Listen())
  {
    return false;
  }

  CSocket sock;
  if (!socket->Accept(sock))
  {
    return false;
  }

  socket->AttachFrom(sock);
  sock.Detach();

  return true;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movl %esi, 0x94(%rsp)
movq 0x98(%rsp), %rdi
callq 0x8040
cmpb $0x0, %al
jne 0x5824
movb $0x0, 0xa7(%rsp)
jmp 0x59ab
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movw 0x94(%rsp), %ax
movw %ax, 0x26(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x3470
movq 0x28(%rsp), %rdx
leaq 0x48d1(%rip), %rsi      # 0xa12a
leaq 0x70(%rsp), %rdi
callq 0x33a0
jmp 0x5865
movq 0x18(%rsp), %rdi
movw 0x26(%rsp), %ax
movzwl %ax, %esi
leaq 0x70(%rsp), %rdx
callq 0x80a0
movb %al, 0x17(%rsp)
jmp 0x5882
movb 0x17(%rsp), %al
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
movb %al, 0x16(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x31a0
leaq 0x6f(%rsp), %rdi
callq 0x3300
movb 0x16(%rsp), %al
testb $0x1, %al
jne 0x58af
jmp 0x58f3
movb $0x0, 0xa7(%rsp)
jmp 0x59ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x58e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x31a0
leaq 0x6f(%rsp), %rdi
callq 0x3300
jmp 0x59bc
movq 0x98(%rsp), %rdi
movl $0x5, %esi
callq 0x81d0
cmpb $0x0, %al
jne 0x5916
movb $0x0, 0xa7(%rsp)
jmp 0x59ab
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5390
movq 0x8(%rsp), %rsi
movq 0x98(%rsp), %rdi
callq 0x8200
movb %al, 0x15(%rsp)
jmp 0x593d
movb 0x15(%rsp), %al
cmpb $0x0, %al
jne 0x5971
movb $0x0, 0xa7(%rsp)
movl $0x1, 0x34(%rsp)
jmp 0x59a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x54d0
jmp 0x59bc
movq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x8250
jmp 0x5985
leaq 0x38(%rsp), %rdi
callq 0x8270
jmp 0x5991
movb $0x1, 0xa7(%rsp)
movl $0x1, 0x34(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x54d0
movb 0xa7(%rsp), %al
andb $0x1, %al
addq $0xa8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x3460
nopw %cs:(%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: Connect(CSocket*, char const*, int)
bool Connect(CSocket *socket, const char *address, int port)
{
  for (auto i = 0; i < 1000; i++)
  {
    if (!socket->Socket())
    {
      return false;
    }
    if (socket->Connect(address, (uint16_t)port, TIMEOUT_MS))
    {
      return true;
    }
    usleep(20);
  }

  return false;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movl %edx, 0x5c(%rsp)
movl $0x0, 0x58(%rsp)
cmpl $0x3e8, 0x58(%rsp)      # imm = 0x3E8
jge 0x5ad9
movq 0x68(%rsp), %rdi
callq 0x8040
cmpb $0x0, %al
jne 0x5a10
movb $0x0, 0x77(%rsp)
jmp 0x5ade
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3470
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x33a0
jmp 0x5a49
movq 0x8(%rsp), %rdi
movzwl 0x5c(%rsp), %edx
leaq 0x38(%rsp), %rsi
movl $0x2710, %ecx           # imm = 0x2710
callq 0x8290
movb %al, 0x7(%rsp)
jmp 0x5a68
leaq 0x38(%rsp), %rdi
callq 0x31a0
leaq 0x37(%rsp), %rdi
callq 0x3300
movb 0x7(%rsp), %al
cmpb $0x0, %al
je 0x5abf
movb $0x1, 0x77(%rsp)
jmp 0x5ade
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x5ab3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x31a0
leaq 0x37(%rsp), %rdi
callq 0x3300
jmp 0x5ae9
movl $0x14, %edi
callq 0x33d0
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x59ea
movb $0x0, 0x77(%rsp)
movb 0x77(%rsp), %al
andb $0x1, %al
addq $0x78, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x3460
nopw %cs:(%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: SenderOTCorrelation::ReadFromFile(std::basic_ifstream<char, std::char_traits<char>>&, unsigned char)
void SenderOTCorrelation::ReadFromFile(ifstream &fin, uint8_t bitsPerFSM)
{
  fin.read((char *)&N, sizeof(N));
  fin.read((char *)&K, sizeof(K));

  blindingFactors = new uint8_t[K * N];

  if (store_sOT_as_key == 1){

    uint8_t keyBuf[AESContext::AES_KEY_LEN];
    fin.read((char *)keyBuf, AESContext::AES_KEY_LEN);

    msgKey.Init(keyBuf);

    msgKey.FillBuffer((uint8_t *)blindingFactors, N * K * sizeof(uint8_t), 0);
  }
  else{
    uint64_t packedLength = packLength(N * K, bitsPerFSM);

    uint8_t *packedBlindingFactors = new uint8_t[packedLength];

    fin.read((char *)packedBlindingFactors, sizeof(uint8_t) * packedLength);

    Unpack(bitsPerFSM, N * K, packedBlindingFactors, blindingFactors);
    delete[] packedBlindingFactors;
  }
}

// Assembly:
subq $0x38, %rsp
movb %dl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movb %al, 0x27(%rsp)
movq 0x30(%rsp), %rsi
movq %rsi, (%rsp)
movq 0x28(%rsp), %rdi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x3360
movq (%rsp), %rsi
movq 0x28(%rsp), %rdi
movl $0x1, %edx
callq 0x3360
movq (%rsp), %rcx
movzbl (%rcx), %eax
imull 0x4(%rcx), %eax
movl %eax, %eax
movl %eax, %edi
callq 0x3030
movq (%rsp), %rcx
movq %rax, 0x120(%rcx)
movl 0x4(%rcx), %eax
movzbl (%rcx), %ecx
imull %ecx, %eax
movl %eax, %eax
movl %eax, %edi
movzbl 0x27(%rsp), %esi
callq 0x6f20
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x3030
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
shlq $0x0, %rdx
callq 0x3360
movq (%rsp), %rcx
movb 0x27(%rsp), %al
movl 0x4(%rcx), %edx
movzbl (%rcx), %esi
imull %esi, %edx
movl %edx, %edx
movl %edx, %esi
movq 0x10(%rsp), %rdx
movq 0x120(%rcx), %rcx
movzbl %al, %edi
callq 0x6f50
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x5ce8
movq 0x8(%rsp), %rdi
callq 0x3370
addq $0x38, %rsp
retq
nopl (%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: ReceiverOTCorrelation::ReadFromFile(std::basic_ifstream<char, std::char_traits<char>>&, unsigned char)
void ReceiverOTCorrelation::ReadFromFile(ifstream &fin, uint8_t bitsPerFSM)
{

  fin.read((char *)&N, sizeof(N));
  fin.read((char *)&K, sizeof(K));

  uint64_t packedLength = packLength(N, bitsPerFSM);

  uint8_t *packedBlindingFactors = new uint8_t[packedLength];
  blindingFactors = new uint8_t[N];

  fin.read((char *)packedBlindingFactors, sizeof(uint8_t) * packedLength);

  Unpack(bitsPerFSM, N, packedBlindingFactors, blindingFactors);
  delete[] packedBlindingFactors;

  uint8_t keyBuf[AESContext::AES_KEY_LEN];
  fin.read((char *)keyBuf, AESContext::AES_KEY_LEN);  

  choiceKey.Init(keyBuf);


  ComputeChoiceBits();
}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movb %al, 0x37(%rsp)
movq 0x40(%rsp), %rsi
movq %rsi, (%rsp)
movq 0x38(%rsp), %rdi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x3360
movq (%rsp), %rsi
movq 0x38(%rsp), %rdi
movl $0x1, %edx
callq 0x3360
movq (%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movzbl 0x37(%rsp), %esi
callq 0x6f20
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rsp)
movl 0x4(%rax), %eax
movl %eax, %edi
callq 0x3030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x128(%rax)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
shlq $0x0, %rdx
callq 0x3360
movq (%rsp), %rcx
movb 0x37(%rsp), %al
movl 0x4(%rcx), %edx
movl %edx, %esi
movq 0x20(%rsp), %rdx
movq 0x128(%rcx), %rcx
movzbl %al, %edi
callq 0x6f50
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x5f2c
movq 0x8(%rsp), %rdi
callq 0x3370
movq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0x10, %edx
callq 0x3360
movq (%rsp), %rdi
addq $0x10, %rdi
leaq 0x10(%rsp), %rsi
callq 0x9860
movq (%rsp), %rdi
callq 0x6630
addq $0x48, %rsp
retq
// File: jBlinden[P]private-codis/protocol.cpp
// Function: ConstructOTReceiverMsg(unsigned char*, ReceiverOTCorrelation const&, unsigned char const*, unsigned int)
void ConstructOTReceiverMsg(uint8_t *receiverMsg, const ReceiverOTCorrelation &rc,
                            const uint8_t *inputArr, uint32_t nOTs)
{
  if (nOTs > rc.N)
  {
    throw "insufficient number of OT correlations";
  }

  for (int i = 0; i < nOTs; i++)
  {
    receiverMsg[i] = (rc.choices[i] - inputArr[i] + rc.K) % rc.K;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x631c
movl $0x8, %edi
callq 0x3150
movq %rax, %rdi
leaq 0x3f6a(%rip), %rax      # 0xa273
movq %rax, (%rdi)
movq 0x6cb5(%rip), %rsi      # 0xcfc8
xorl %eax, %eax
movl %eax, %edx
callq 0x3440
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jae 0x6382
movq 0x18(%rsp), %rax
movq 0x120(%rax), %rax
movslq 0x8(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0x10(%rsp), %rcx
movslq 0x8(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movq 0x18(%rsp), %rcx
movzbl (%rcx), %ecx
addl %ecx, %eax
movq 0x18(%rsp), %rcx
movzbl (%rcx), %ecx
cltd
idivl %ecx
movq 0x20(%rsp), %rax
movslq 0x8(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x6324
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: ConstructOTSenderMsg(unsigned char*, SenderOTCorrelation const&, unsigned char const*, unsigned char*, unsigned int, unsigned char)
void ConstructOTSenderMsg(uint8_t *senderMsg, const SenderOTCorrelation &sc,
                          const uint8_t *msgs, uint8_t *receiverArr, uint32_t nOTs, uint8_t bitsPerMsg)
{
  if (nOTs > sc.N)
  {
    throw "insufficient number of OT correlations";
  }

  memcpy(senderMsg, msgs, nOTs * sc.K * sizeof(uint8_t));
  for (int i = 0; i < nOTs; i++)
  {
    for (int j = 0; j < sc.K; j++)
    {
      senderMsg[sc.K * i + j] ^= sc.blindingFactors[sc.K * i + ((j + receiverArr[i]) % sc.K)];
      senderMsg[sc.K * i + j] &= (uint8_t)(1 << bitsPerMsg) - 1;
    }
  }
}

// Assembly:
subq $0x38, %rsp
movb %r9b, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
movb %al, 0x13(%rsp)
movl 0x14(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x63e9
movl $0x8, %edi
callq 0x3150
movq %rax, %rdi
leaq 0x3e9d(%rip), %rax      # 0xa273
movq %rax, (%rdi)
movq 0x6be8(%rip), %rsi      # 0xcfc8
xorl %eax, %eax
movl %eax, %edx
callq 0x3440
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x14(%rsp), %eax
movq 0x28(%rsp), %rcx
movzbl (%rcx), %ecx
imull %ecx, %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x3200
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0x6502
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movq 0x28(%rsp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x64f0
movq 0x28(%rsp), %rax
movq 0x120(%rax), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movzbl (%rax), %ecx
imull 0xc(%rsp), %ecx
movl 0x8(%rsp), %eax
movq 0x18(%rsp), %rdx
movslq 0xc(%rsp), %rsi
movzbl (%rdx,%rsi), %edx
addl %edx, %eax
movq 0x28(%rsp), %rdx
movzbl (%rdx), %esi
cltd
idivl %esi
movq (%rsp), %rax
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movzbl (%rcx), %ecx
imull 0xc(%rsp), %ecx
addl 0x8(%rsp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movzbl 0x13(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
movzbl %al, %esi
subl $0x1, %esi
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movzbl (%rcx), %ecx
imull 0xc(%rsp), %ecx
addl 0x8(%rsp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
andl %esi, %edx
movb %dl, (%rax,%rcx)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x642d
jmp 0x64f2
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6417
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: RecoverReceiverMsg(unsigned char*, ReceiverOTCorrelation const&, unsigned char*, unsigned char*, unsigned int, unsigned char, unsigned char)
void RecoverReceiverMsg(uint8_t *msgs, const ReceiverOTCorrelation &rc,
                        uint8_t *inputArr, uint8_t *senderMsg, uint32_t nOTs, uint8_t bitsPerMsg, uint8_t bitsPerFSM)
{
  if (nOTs > rc.N) {
    throw "insufficient number of OT correlations";
  }

  memcpy(msgs, rc.blindingFactors, nOTs * sizeof(uint8_t));
  for (int i = 0; i < nOTs; i++) {
      msgs[i] ^= (senderMsg[rc.K*i + inputArr[i]] & ((uint8_t) (1 << bitsPerFSM) - 1));
      msgs[i] &= (uint8_t) (1 << bitsPerMsg) - 1;
  }
}

// Assembly:
subq $0x38, %rsp
movb %r9b, %al
movb 0x40(%rsp), %r9b
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
movb %al, 0x13(%rsp)
movl 0x14(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x656e
movl $0x8, %edi
callq 0x3150
movq %rax, %rdi
leaq 0x3d18(%rip), %rax      # 0xa273
movq %rax, (%rdi)
movq 0x6a63(%rip), %rsi      # 0xcfc8
xorl %eax, %eax
movl %eax, %edx
callq 0x3440
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x128(%rax), %rsi
movl 0x14(%rsp), %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x3200
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0x6629
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
movzbl (%rcx), %ecx
imull 0xc(%rsp), %ecx
movq 0x20(%rsp), %rdx
movslq 0xc(%rsp), %rsi
movzbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
movzbl 0x40(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
movzbl %al, %eax
subl $0x1, %eax
andl %eax, %esi
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movzbl 0x13(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
movzbl %al, %esi
subl $0x1, %esi
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %edx
andl %esi, %edx
movb %dl, (%rax,%rcx)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6596
addq $0x38, %rsp
retq
nop
// File: jBlinden[P]private-codis/protocol.cpp
// Function: ReceiverOTCorrelation::ComputeChoiceBits()
void ReceiverOTCorrelation::ComputeChoiceBits()
{
  choices = new uint8_t[N];
  
  choiceKey.FillBuffer((uint8_t *)choices, N, 0);

  for (uint32_t i = 0; i < N; i++)
  {
    choices[i] %= K;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x4(%rax), %eax
movl %eax, %edi
callq 0x3030
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x120(%rax)
movq %rax, %rdi
addq $0x10, %rdi
movq 0x120(%rax), %rsi
movl 0x4(%rax), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x9d50
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x4(%rcx), %eax
jae 0x66c0
movq 0x10(%rsp), %rax
movzbl (%rax), %esi
movq 0x120(%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %ecx
movzbl (%rax,%rcx), %eax
cltd
idivl %esi
movq 0x8(%rsp), %rax
movb %dl, (%rax,%rcx)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x667e
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: OTSenderProtocol(CSocket*, SenderOTCorrelation const&, unsigned int, unsigned char const*)
void OTSenderProtocol(CSocket *socket, const SenderOTCorrelation &corr,
                      uint32_t nOTs, const uint8_t *msgs)
{
  if (nOTs > corr.N)
  {
    throw "insufficient number of of OT correlations";
  }

  uint8_t *clientMsg = new uint8_t[nOTs];
  socket->ReceiveLarge(clientMsg, nOTs * sizeof(uint8_t));

  cout << "Receiving: " << (uint32_t) clientMsg[0] << endl;

  uint8_t *senderMsg = new uint8_t[corr.K * nOTs];
  ConstructOTSenderMsg(senderMsg, corr, msgs, clientMsg, nOTs, 8);

  socket->SendLarge((uint8_t *)senderMsg, corr.K * nOTs * sizeof(uint8_t));

  cout << "Sending: " << (uint32_t) senderMsg[0] << (uint32_t)senderMsg[1] << (uint32_t)senderMsg[2] <<(uint32_t) senderMsg[3] << endl;

  delete[] clientMsg;
  delete[] senderMsg;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq %rcx, 0x28(%rsp)
movl 0x34(%rsp), %eax
movq 0x38(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x671c
movl $0x8, %edi
callq 0x3150
movq %rax, %rdi
leaq 0x3b91(%rip), %rax      # 0xa29a
movq %rax, (%rdi)
movq 0x68b5(%rip), %rsi      # 0xcfc8
xorl %eax, %eax
movl %eax, %edx
callq 0x3440
movl 0x34(%rsp), %eax
movl %eax, %edi
callq 0x3030
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x34(%rsp), %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x8410
movq 0x688c(%rip), %rdi      # 0xcfd8
leaq 0x3b71(%rip), %rsi      # 0xa2c4
callq 0x32a0
movq %rax, %rdi
movq 0x20(%rsp), %rax
movzbl (%rax), %esi
callq 0x3390
movq %rax, %rdi
movq 0x684e(%rip), %rsi      # 0xcfc0
callq 0x32f0
movq 0x38(%rsp), %rax
movzbl (%rax), %eax
imull 0x34(%rsp), %eax
movl %eax, %eax
movl %eax, %edi
callq 0x3030
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl 0x34(%rsp), %r8d
movl $0x8, %r9d
callq 0x6390
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x38(%rsp), %rax
movzbl (%rax), %eax
imull 0x34(%rsp), %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x84d0
movq 0x67f7(%rip), %rdi      # 0xcfd8
leaq 0x3ae8(%rip), %rsi      # 0xa2d0
callq 0x32a0
movq %rax, %rdi
movq 0x18(%rsp), %rax
movzbl (%rax), %esi
callq 0x3390
movq %rax, %rdi
movq 0x18(%rsp), %rax
movzbl 0x1(%rax), %esi
callq 0x3390
movq %rax, %rdi
movq 0x18(%rsp), %rax
movzbl 0x2(%rax), %esi
callq 0x3390
movq %rax, %rdi
movq 0x18(%rsp), %rax
movzbl 0x3(%rax), %esi
callq 0x3390
movq %rax, %rdi
movq 0x6786(%rip), %rsi      # 0xcfc0
callq 0x32f0
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x6859
movq 0x10(%rsp), %rdi
callq 0x3370
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x6873
movq 0x8(%rsp), %rdi
callq 0x3370
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: CreateAndExportOTCorrelation(std::basic_ofstream<char, std::char_traits<char>>&, std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, unsigned char, unsigned char, unsigned char)
void CreateAndExportOTCorrelation(ofstream &out1, ofstream &out2, uint32_t N, uint8_t K, uint8_t bitsPerFSMROT, uint8_t bitsPerFSMSOT)
{
  SenderOTCorrelation senderOTC(N, K);
  ReceiverOTCorrelation receiverOTC(N, K);

  CreateOTCorrelation(senderOTC, receiverOTC, bitsPerFSMROT, bitsPerFSMSOT);

  senderOTC.WriteToFile(out1, bitsPerFSMSOT);
  receiverOTC.WriteToFile(out2, bitsPerFSMROT);
}

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movl %r8d, 0xc(%rsp)
movl %ecx, %eax
movl 0xc(%rsp), %ecx
movl %eax, 0x10(%rsp)
movl %edx, %eax
movl 0x10(%rsp), %edx
movl %eax, 0x14(%rsp)
movq %rsi, %rax
movl 0x14(%rsp), %esi
movq %rax, 0x18(%rsp)
movq %rdi, %r8
movq 0x18(%rsp), %rdi
movb %r9b, %al
movq %r8, 0x2a0(%rsp)
movq %rdi, 0x298(%rsp)
movl %esi, 0x294(%rsp)
movb %dl, 0x293(%rsp)
movb %cl, 0x292(%rsp)
movb %al, 0x291(%rsp)
movl 0x294(%rsp), %esi
movzbl 0x293(%rsp), %edx
leaq 0x160(%rsp), %rdi
callq 0x5b00
movl 0x294(%rsp), %esi
movzbl 0x293(%rsp), %edx
leaq 0x30(%rsp), %rdi
callq 0x5d30
jmp 0x6b1a
movzbl 0x292(%rsp), %edx
movzbl 0x291(%rsp), %ecx
leaq 0x160(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5fd0
jmp 0x6b3e
movq 0x2a0(%rsp), %rsi
movzbl 0x291(%rsp), %edx
leaq 0x160(%rsp), %rdi
callq 0x6be0
jmp 0x6b5d
movq 0x298(%rsp), %rsi
movzbl 0x292(%rsp), %edx
leaq 0x30(%rsp), %rdi
callq 0x6cb0
jmp 0x6b79
leaq 0x30(%rsp), %rdi
callq 0x5f60
leaq 0x160(%rsp), %rdi
callq 0x5cf0
addq $0x2a8, %rsp            # imm = 0x2A8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x6bc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x5f60
leaq 0x160(%rsp), %rdi
callq 0x5cf0
movq 0x28(%rsp), %rdi
callq 0x3460
nopw (%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: SenderOTCorrelation::WriteToFile(std::basic_ofstream<char, std::char_traits<char>>&, unsigned char) const
void SenderOTCorrelation::WriteToFile(ofstream &fout, uint8_t bitsPerFSM) const
{
  fout.write((char *)&N, sizeof(N));
  fout.write((char *)&K, sizeof(K));

  if (store_sOT_as_key == 1){
    fout.write((char *)msgKey.keyBytes, sizeof(msgKey.keyBytes));
  }
  else{

    uint8_t* packed = Pack(bitsPerFSM, N * K, blindingFactors);
    uint64_t newLength = packLength(N * K, bitsPerFSM);

    fout.write((char *)packed, sizeof(uint8_t) * newLength);

    delete[] packed;
  }
}

// Assembly:
subq $0x38, %rsp
movb %dl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movb %al, 0x27(%rsp)
movq 0x30(%rsp), %rsi
movq %rsi, (%rsp)
movq 0x28(%rsp), %rdi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x3380
movq (%rsp), %rsi
movq 0x28(%rsp), %rdi
movl $0x1, %edx
callq 0x3380
movq (%rsp), %rcx
movb 0x27(%rsp), %al
movl 0x4(%rcx), %edx
movzbl (%rcx), %esi
imull %esi, %edx
movl %edx, %edx
movl %edx, %esi
movq 0x120(%rcx), %rdx
movzbl %al, %edi
callq 0x6d90
movq (%rsp), %rcx
movq %rax, 0x18(%rsp)
movl 0x4(%rcx), %eax
movzbl (%rcx), %ecx
imull %ecx, %eax
movl %eax, %eax
movl %eax, %edi
movzbl 0x27(%rsp), %esi
callq 0x6f20
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
shlq $0x0, %rdx
callq 0x3380
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x6c9e
movq 0x8(%rsp), %rdi
callq 0x3370
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: jBlinden[P]private-codis/protocol.cpp
// Function: ReceiverOTCorrelation::WriteToFile(std::basic_ofstream<char, std::char_traits<char>>&, unsigned char) const
void ReceiverOTCorrelation::WriteToFile(ofstream &fout, uint8_t bitsPerFSM) const
{
  fout.write((char *)&N, sizeof(N));
  fout.write((char *)&K, sizeof(K));

  uint8_t* packed = Pack(bitsPerFSM, N, blindingFactors);
  uint64_t newLength = packLength(N, bitsPerFSM);

  fout.write((char *)packed, sizeof(uint8_t) * newLength);

  delete[] packed;
  
  fout.write((char *)choiceKey.keyBytes, sizeof(choiceKey.keyBytes));
}

// Assembly:
subq $0x38, %rsp
movb %dl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movb %al, 0x27(%rsp)
movq 0x30(%rsp), %rsi
movq %rsi, (%rsp)
movq 0x28(%rsp), %rdi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x3380
movq (%rsp), %rsi
movq 0x28(%rsp), %rdi
movl $0x1, %edx
callq 0x3380
movq (%rsp), %rcx
movb 0x27(%rsp), %al
movl 0x4(%rcx), %edx
movl %edx, %esi
movq 0x128(%rcx), %rdx
movzbl %al, %edi
callq 0x6d90
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rsp)
movl 0x4(%rax), %eax
movl %eax, %edi
movzbl 0x27(%rsp), %esi
callq 0x6f20
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
shlq $0x0, %rdx
callq 0x3380
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x6d61
movq 0x8(%rsp), %rdi
callq 0x3370
movq (%rsp), %rsi
movq 0x28(%rsp), %rdi
addq $0x10, %rsi
addq $0x100, %rsi            # imm = 0x100
movl $0x10, %edx
callq 0x3380
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movb %dil, %al
movb %al, 0x47(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movzbl 0x47(%rsp), %esi
callq 0x6f20
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3030
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rdx
xorl %esi, %esi
callq 0x3170
movb $0x0, 0x1f(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movslq 0xc(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x6f10
movzbl 0x1f(%rsp), %eax
movzbl 0x47(%rsp), %ecx
addl %ecx, %eax
cmpl $0x8, %eax
jg 0x6e6a
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %esi
movzbl 0x1f(%rsp), %ecx
shll %cl, %esi
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movzbl (%rax,%rcx), %edx
addl %esi, %edx
movb %dl, (%rax,%rcx)
movzbl 0x47(%rsp), %ecx
movzbl 0x1f(%rsp), %eax
addl %ecx, %eax
movb %al, 0x1f(%rsp)
movzbl 0x1f(%rsp), %eax
cmpl $0x8, %eax
jne 0x6e65
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movb $0x0, 0x1f(%rsp)
jmp 0x6efe
movzbl 0x1f(%rsp), %ecx
movl $0x8, %eax
subl %ecx, %eax
movb %al, 0xb(%rsp)
movzbl 0xb(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movb %al, 0xa(%rsp)
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %esi
movzbl 0xa(%rsp), %eax
andl %eax, %esi
movzbl 0x1f(%rsp), %ecx
shll %cl, %esi
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movzbl (%rax,%rcx), %edx
addl %esi, %edx
movb %dl, (%rax,%rcx)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movzbl 0xb(%rsp), %ecx
sarl %cl, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rax,%rcx)
movzbl 0x47(%rsp), %eax
movzbl 0xb(%rsp), %ecx
subl %ecx, %eax
movb %al, 0x1f(%rsp)
jmp 0x6f00
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6def
movq 0x20(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x48, %rsp
movb %dil, %al
movb %al, 0x47(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movzbl 0x47(%rsp), %esi
callq 0x6f20
movq %rax, 0x20(%rsp)
movb $0x0, 0x1f(%rsp)
movq $0x0, 0x10(%rsp)
movzbl 0x47(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movb %al, 0xf(%rsp)
movl $0x0, 0x8(%rsp)
movslq 0x8(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x70e1
movzbl 0x1f(%rsp), %eax
movzbl 0x47(%rsp), %ecx
addl %ecx, %eax
cmpl $0x8, %eax
jg 0x7025
movq 0x30(%rsp), %rax
movq 0x10(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movzbl 0x1f(%rsp), %ecx
sarl %cl, %eax
movzbl 0xf(%rsp), %ecx
andl %ecx, %eax
movb %al, %dl
movq 0x28(%rsp), %rax
movslq 0x8(%rsp), %rcx
movb %dl, (%rax,%rcx)
movzbl 0x47(%rsp), %ecx
movzbl 0x1f(%rsp), %eax
addl %ecx, %eax
movb %al, 0x1f(%rsp)
movzbl 0x1f(%rsp), %eax
cmpl $0x8, %eax
jne 0x7020
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movb $0x0, 0x1f(%rsp)
jmp 0x70cf
movb $0x0, 0x7(%rsp)
movzbl 0x1f(%rsp), %ecx
movl $0x8, %eax
subl %ecx, %eax
movb %al, 0x6(%rsp)
movq 0x30(%rsp), %rax
movq 0x10(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movzbl 0x1f(%rsp), %ecx
sarl %cl, %eax
movl %eax, %ecx
movzbl 0x7(%rsp), %eax
addl %ecx, %eax
movb %al, 0x7(%rsp)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movzbl 0x47(%rsp), %eax
movzbl 0x6(%rsp), %ecx
subl %ecx, %eax
movb %al, 0x5(%rsp)
movzbl 0x5(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movb %al, 0x4(%rsp)
movq 0x30(%rsp), %rax
movq 0x10(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movzbl 0x4(%rsp), %ecx
andl %ecx, %eax
movzbl 0x6(%rsp), %ecx
shll %cl, %eax
movl %eax, %ecx
movzbl 0x7(%rsp), %eax
addl %ecx, %eax
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %dl
movq 0x28(%rsp), %rax
movslq 0x8(%rsp), %rcx
movb %dl, (%rax,%rcx)
movb 0x5(%rsp), %al
movb %al, 0x1f(%rsp)
jmp 0x70d1
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x6fa7
movq 0x28(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rsi, (%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x4, %edx
callq 0x3380
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x3380
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
addq $0x8, %rsi
movl $0x4, %edx
callq 0x3380
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
addq $0xc, %rsi
movl $0x4, %edx
callq 0x3380
movl $0x0, 0x14(%rsp)
movq (%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x8(%rcx), %eax
jae 0x7197
movq (%rsp), %rax
movq 0x20(%rsp), %rdi
movq 0x10(%rax), %rsi
movslq 0x14(%rsp), %rax
addq %rax, %rsi
movl $0x1, %edx
callq 0x3380
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x715e
movl $0x0, 0x10(%rsp)
movq (%rsp), %rcx
movl 0x10(%rsp), %eax
cmpl 0xc(%rcx), %eax
jae 0x71d8
movq (%rsp), %rax
movq 0x20(%rsp), %rdi
movq 0x18(%rax), %rsi
movslq 0x10(%rsp), %rax
addq %rax, %rsi
movl $0x1, %edx
callq 0x3380
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x719f
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x4(%rcx), %eax
jae 0x7219
movq (%rsp), %rax
movq 0x20(%rsp), %rdi
movq 0x20(%rax), %rsi
movslq 0xc(%rsp), %rax
addq %rax, %rsi
movl $0x1, %edx
callq 0x3380
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x71e0
addq $0x28, %rsp
retq
nop
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rsi
movq %rsi, (%rsp)
movb $0x0, 0x28(%rsi)
movq 0x18(%rsp), %rdi
movl $0x4, %edx
callq 0x3360
movq (%rsp), %rsi
movq 0x18(%rsp), %rdi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x3360
movq (%rsp), %rsi
movq 0x18(%rsp), %rdi
addq $0x8, %rsi
movl $0x4, %edx
callq 0x3360
movq (%rsp), %rsi
movq 0x18(%rsp), %rdi
addq $0xc, %rsi
movl $0x4, %edx
callq 0x3360
movq (%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %edi
callq 0x3030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, 0x14(%rsp)
movq (%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x8(%rcx), %eax
jae 0x72e9
movq (%rsp), %rax
movq 0x18(%rsp), %rdi
movq 0x10(%rax), %rsi
movslq 0x14(%rsp), %rax
addq %rax, %rsi
movl $0x1, %edx
callq 0x3360
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x72b0
movq (%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, %edi
callq 0x3030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, 0x10(%rsp)
movq (%rsp), %rcx
movl 0x10(%rsp), %eax
cmpl 0xc(%rcx), %eax
jae 0x7343
movq (%rsp), %rax
movq 0x18(%rsp), %rdi
movq 0x18(%rax), %rsi
movslq 0x10(%rsp), %rax
addq %rax, %rsi
movl $0x1, %edx
callq 0x3360
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x730a
movq (%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
callq 0x3030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x4(%rcx), %eax
jae 0x739d
movq (%rsp), %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rax), %rsi
movslq 0xc(%rsp), %rax
addq %rax, %rsi
movl $0x1, %edx
callq 0x3360
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x7364
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl 0x8(%rsi), %eax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x2c(%rsp), %eax
cmpl 0x8(%rcx), %eax
jae 0x77b2
movl $0x130, %edi            # imm = 0x130
callq 0x32c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rsi
movl $0x1, %edx
callq 0x5b90
jmp 0x7778
movq 0x8(%rsp), %rdx
movq 0x30(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x7744
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x3270
jmp 0x77bc
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x3460
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl 0xc(%rsi), %eax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x2c(%rsp), %eax
cmpl 0xc(%rcx), %eax
jae 0x7882
movl $0x130, %edi            # imm = 0x130
callq 0x32c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rsi
movl $0x2, %edx
callq 0x5b90
jmp 0x7848
movq 0x8(%rsp), %rdx
movq 0x30(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x7814
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x3270
jmp 0x788c
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x3460
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movb $0x1, 0x28(%rsi)
movl 0x8(%rsi), %eax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x2c(%rsp), %eax
cmpl 0x8(%rcx), %eax
jae 0x7956
movl $0x130, %edi            # imm = 0x130
callq 0x32c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rsi
movl $0x4, %edx
callq 0x5de0
jmp 0x791c
movq 0x8(%rsp), %rdx
movq 0x30(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x78e8
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x3270
jmp 0x7960
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x3460
nopw (%rax,%rax)