LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::OU_noise_init()
void OU_noise_init(void) {
        // ******************************************************
        // initialize pseudo random sequence for the Ornstein-Uhlenbeck (OU) process
        // ******************************************************
        OUphases.resize(nmodes*ncmp*2);
        for (int m = 0; m < nmodes; m++) {
            for (int d = 0; d < ncmp; d++) {
                for (int ir = 0; ir < 2; ir++) {
                    OUphases[2*ncmp*m+2*d+ir] = OUvar * get_random_number();
                }
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq %rcx, %rdi
addq $0x120, %rdi            # imm = 0x120
movl 0x154(%rcx), %eax
imull 0x160(%rcx), %eax
shll %eax
movslq %eax, %rsi
callq 0xed60
movl $0x0, -0xc(%rbp)
movq -0x20(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x154(%rcx), %eax
jge 0xd34d
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x160(%rcx), %eax
jge 0xd33d
movl $0x0, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jge 0xd32d
movq -0x20(%rbp), %rdi
movsd 0x1b0(%rdi), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x112d0
movq -0x20(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movq %rax, %rdi
addq $0x120, %rdi            # imm = 0x120
movl 0x160(%rax), %eax
shll %eax
imull -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
shll %ecx
addl %ecx, %eax
addl -0x14(%rbp), %eax
movslq %eax, %rsi
callq 0xad50
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xd2c0
jmp 0xd32f
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xd2a6
jmp 0xd33f
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xd28c
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::get_random_number()
double get_random_number(void) {
        // ******************************************************
        //  get random number; draws a number randomly from a Gaussian distribution
        //  with the standard uniform distribution function "ran1s"
        //  using the Box-Muller transformation in polar coordinates. The
        //  resulting Gaussian has unit variance.
        // ******************************************************
        double r1 = ran1s(&seed);
        double r2 = ran1s(&seed);
        double g1 = sqrt(2.0*log(1.0/r1))*cos(2*M_PI*r2);
        return g1;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq %rdi, %rsi
addq $0x168, %rsi            # imm = 0x168
callq 0x11370
movq -0x30(%rbp), %rdi
movsd %xmm0, -0x10(%rbp)
movq %rdi, %rsi
addq $0x168, %rsi            # imm = 0x168
callq 0x11370
movsd %xmm0, -0x18(%rbp)
movsd 0x3d00(%rip), %xmm0     # 0x15018
divsd -0x10(%rbp), %xmm0
callq 0x3270
movaps %xmm0, %xmm1
movsd 0x3d03(%rip), %xmm0     # 0x15030
mulsd %xmm1, %xmm0
callq 0x3250
movsd %xmm0, -0x28(%rbp)
movsd 0x3d45(%rip), %xmm0     # 0x15088
mulsd -0x18(%rbp), %xmm0
callq 0x35a0
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::ran1s(int*)
double ran1s(int * idum) {
        // ******************************************************
        static const int IA=16807, IM=2147483647, IQ=127773, IR=2836;
        static const double AM=1.0/IM, RNMX=1.0-1.2e-7;
        if (*idum <= 0) *idum = std::max(-*idum, 1);
        int k = *idum/IQ;
        *idum = IA*(*idum-k*IQ)-IR*k;
        if (*idum < 0) *idum = *idum+IM;
        int iy = *idum;
        double ret = std::min(AM*iy, RNMX); // returns uniform random number in [0,1[
        return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jg 0x113b0
movq -0x10(%rbp), %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x14(%rbp)
movl $0x1, -0x18(%rbp)
leaq -0x14(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x10fa0
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl $0x1f31d, %ecx          # imm = 0x1F31D
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
imull $0x1f31d, -0x1c(%rbp), %ecx # imm = 0x1F31D
subl %ecx, %eax
imull $0x41a7, %eax, %ecx     # imm = 0x41A7
imull $0xb14, -0x1c(%rbp), %eax # imm = 0xB14
subl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jge 0x11400
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
cvtsi2sdl -0x20(%rbp), %xmm1
movsd 0x3c9a(%rip), %xmm0     # 0x150b0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
leaq 0x4f66(%rip), %rsi      # 0x16390
callq 0x11290
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::TurbGen_printf_raw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ...)
void TurbGen_printf_raw(std::string format, ...) {
        // ******************************************************
        // special printf prepends string and only lets PE=0 print
        // ******************************************************
        va_list args;
        va_start(args, format);
        std::string new_format = format;
        if (PE == 0) vfprintf(stdout, new_format.c_str(), args);
        va_end(args);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x1239e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rdx, -0xf0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x50(%rbp), %rdi
callq 0x3140
movq -0x108(%rbp), %rax
cmpl $0x0, 0x150(%rax)
jne 0x12437
movq 0x8ba7(%rip), %rax      # 0x1afb8
movq (%rax), %rax
movq %rax, -0x110(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3120
movq -0x110(%rbp), %rdi
movq %rax, %rsi
leaq -0x30(%rbp), %rdx
callq 0x3450
leaq -0x50(%rbp), %rdi
callq 0x31e0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/./thumbsim.hpp
// Function: Cache::printStats() const
void printStats() const {
         cout << dec << size << " byte cache (blocksize " << dec << blocksize
            << " bytes): " << hits << " hits, " << misses << " misses (hit rate: " 
                              << (static_cast<float>(hits) * 100.0f /
                                    static_cast<float>(hits + misses)) << "%)" << endl;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0xfdad(%rip), %rdi      # 0x14fc8
leaq 0x24e(%rip), %rsi       # 0x5470
movq %rsi, -0x18(%rbp)
callq 0x2090
movq %rax, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x8eda(%rip), %rsi      # 0xe11d
callq 0x21d0
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x2090
movq %rax, %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x8ec8(%rip), %rsi      # 0xe135
callq 0x21d0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x8eb4(%rip), %rsi      # 0xe13f
callq 0x21d0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x8e9e(%rip), %rsi      # 0xe147
callq 0x21d0
movq -0x10(%rbp), %rcx
movq %rax, %rdi
movl 0x20(%rcx), %eax
movl 0x24(%rcx), %ecx
movl %eax, %edx
movl %edx, %eax
cvtsi2ss %rdx, %xmm0
movss 0x8d8c(%rip), %xmm1     # 0xe058
mulss %xmm1, %xmm0
addl %ecx, %eax
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
callq 0x2150
movq %rax, %rdi
leaq 0x8e71(%rip), %rsi      # 0xe15b
callq 0x21d0
movq %rax, %rdi
movq 0xfcb7(%rip), %rsi      # 0x14fb0
callq 0x2200
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(DP_Type)
DP_Ops decode (const DP_Type data) {
  if (data.instr.DP_Instr.op == DP_CMP) {
    // 315: insert code here to print cmp instruction
    return DP_CMP;
  }
  else {
    cerr << "UNKNOWN DP TYPE -- Exiting" << endl;
    exit(1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
shrw $0x6, %ax
andw $0xf, %ax
movzwl %ax, %eax
cmpl $0xa, %eax
jne 0x6bbe
movl $0xa, %eax
addq $0x10, %rsp
popq %rbp
retq
movq 0xe42b(%rip), %rdi      # 0x14ff0
leaq 0x7618(%rip), %rsi      # 0xe1e4
callq 0x21d0
movq %rax, %rdi
movq 0xe3d5(%rip), %rsi      # 0x14fb0
callq 0x2200
movl $0x1, %edi
callq 0x2260
nopw (%rax,%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(COND_Type)
int decode (const COND_Type data) {
  // complete
  if (opts.instrs) { 
    cout << "b";
    printCond(data.instr.b.cond);
    // consider calling your sign extension function here to get the 
    // printout to be consistent
    cout << " 0x" << hex << rf[15] + 2*(int)((char)(data.instr.b.imm))+2 << endl;
  }
  return COND;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
leaq 0xd71e(%rip), %rax      # 0x15284
testb $0x1, 0x2(%rax)
je 0x7c06
movq 0xd451(%rip), %rdi      # 0x14fc8
leaq 0x6709(%rip), %rsi      # 0xe287
callq 0x21d0
movw -0x2(%rbp), %ax
shrw $0x8, %ax
andw $0xf, %ax
movsbl %al, %edi
callq 0x7c20
movq 0xd42a(%rip), %rdi      # 0x14fc8
leaq 0x66e5(%rip), %rsi      # 0xe28a
callq 0x21d0
movq %rax, %rdi
leaq -0x4cb4(%rip), %rsi     # 0x2f00
callq 0x2090
movq %rax, -0x10(%rbp)
leaq 0xd694(%rip), %rdi      # 0x15258
movl $0xf, %esi
callq 0x8430
movl %eax, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x2fd0
movq -0x10(%rbp), %rdi
movl %eax, %esi
movw -0x2(%rbp), %ax
andw $0xff, %ax
movsbl %al, %eax
shll %eax
addl %eax, %esi
addl $0x2, %esi
callq 0x22b0
movq %rax, %rdi
movq 0xd3af(%rip), %rsi      # 0x14fb0
callq 0x2200
movl $0x5, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/./thumbsim.hpp
// Function: printCond(char)
static void printCond(char byte) {
   switch (byte) {
      case 0:
         cout << "eq";
         break;
      case 1:
         cout << "ne";
         break;
      case 2:
         cout << "cs";
         break;
      case 3:
         cout << "cc";
         break;
      case 4:
         cout << "mi";
         break;
      case 5:
         cout << "pl";
         break;
      case 6:
         cout << "vs";
         break;
      case 7:
         cout << "vc";
         break;
      case 8:
         cout << "hi";
         break;
      case 9:
         cout << "ls";
         break;
      case 10:
         cout << "ge";
         break;
      case 11:
         cout << "lt";
         break;
      case 12:
         cout << "gt";
         break;
      case 13:
         cout << "le";
         break;
      default:
         cout << "";
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0xd, %eax
ja 0x7d93
movq -0x10(%rbp), %rax
leaq 0x6514(%rip), %rcx      # 0xe160
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xd36c(%rip), %rdi      # 0x14fc8
leaq 0x663f(%rip), %rsi      # 0xe2a2
callq 0x21d0
jmp 0x7da6
movq 0xd354(%rip), %rdi      # 0x14fc8
leaq 0x662a(%rip), %rsi      # 0xe2a5
callq 0x21d0
jmp 0x7da6
movq 0xd33c(%rip), %rdi      # 0x14fc8
leaq 0x6615(%rip), %rsi      # 0xe2a8
callq 0x21d0
jmp 0x7da6
movq 0xd324(%rip), %rdi      # 0x14fc8
leaq 0x6600(%rip), %rsi      # 0xe2ab
callq 0x21d0
jmp 0x7da6
movq 0xd30c(%rip), %rdi      # 0x14fc8
leaq 0x65eb(%rip), %rsi      # 0xe2ae
callq 0x21d0
jmp 0x7da6
movq 0xd2f4(%rip), %rdi      # 0x14fc8
leaq 0x65d6(%rip), %rsi      # 0xe2b1
callq 0x21d0
jmp 0x7da6
movq 0xd2dc(%rip), %rdi      # 0x14fc8
leaq 0x65c1(%rip), %rsi      # 0xe2b4
callq 0x21d0
jmp 0x7da6
movq 0xd2c4(%rip), %rdi      # 0x14fc8
leaq 0x65ac(%rip), %rsi      # 0xe2b7
callq 0x21d0
jmp 0x7da6
movq 0xd2ac(%rip), %rdi      # 0x14fc8
leaq 0x6597(%rip), %rsi      # 0xe2ba
callq 0x21d0
jmp 0x7da6
movq 0xd297(%rip), %rdi      # 0x14fc8
leaq 0x6585(%rip), %rsi      # 0xe2bd
callq 0x21d0
jmp 0x7da6
movq 0xd282(%rip), %rdi      # 0x14fc8
leaq 0x6573(%rip), %rsi      # 0xe2c0
callq 0x21d0
jmp 0x7da6
movq 0xd26d(%rip), %rdi      # 0x14fc8
leaq 0x6561(%rip), %rsi      # 0xe2c3
callq 0x21d0
jmp 0x7da6
movq 0xd258(%rip), %rdi      # 0x14fc8
leaq 0x654f(%rip), %rsi      # 0xe2c6
callq 0x21d0
jmp 0x7da6
movq 0xd243(%rip), %rdi      # 0x14fc8
leaq 0x653d(%rip), %rsi      # 0xe2c9
callq 0x21d0
jmp 0x7da6
movq 0xd22e(%rip), %rdi      # 0x14fc8
leaq 0x652e(%rip), %rsi      # 0xe2cf
callq 0x21d0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(UNCOND_Type)
int decode (const UNCOND_Type data) {
  // complete
  if (opts.instrs) { 
    // consider calling your sign extension function here to get the 
    // printout to be consistent
    cout << "b 0x" << hex << rf[15] + 2*(int)((char)(data.instr.b.imm))+2 << endl;
  }
  return UNCOND;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
leaq 0xd4be(%rip), %rax      # 0x15284
testb $0x1, 0x2(%rax)
je 0x7e3b
movq 0xd1f5(%rip), %rdi      # 0x14fc8
leaq 0x64af(%rip), %rsi      # 0xe289
callq 0x21d0
movq %rax, %rdi
leaq -0x4ee9(%rip), %rsi     # 0x2f00
callq 0x2090
movq %rax, -0x10(%rbp)
leaq 0xd45f(%rip), %rdi      # 0x15258
movl $0xf, %esi
callq 0x8430
movl %eax, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x2fd0
movq -0x10(%rbp), %rdi
movl %eax, %esi
movw -0x2(%rbp), %ax
andw $0x7ff, %ax             # imm = 0x7FF
movsbl %al, %eax
shll %eax
addl %eax, %esi
addl $0x2, %esi
callq 0x22b0
movq %rax, %rdi
movq 0xd17a(%rip), %rsi      # 0x14fb0
callq 0x2200
movl $0x6, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(BL_Type)
BL_Ops decode (const BL_Type data) {
  // complete
  if (opts.instrs) { 
    cout << "bl 0x" << hex << data.instr.bl_upper.imm10 << endl;
  }
  return BL_UPPER;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
leaq 0xd41e(%rip), %rax      # 0x15284
testb $0x1, 0x2(%rax)
je 0x7eb0
movq 0xd155(%rip), %rdi      # 0x14fc8
leaq 0x6414(%rip), %rsi      # 0xe28e
callq 0x21d0
movq %rax, %rdi
leaq -0x4f89(%rip), %rsi     # 0x2f00
callq 0x2090
movq %rax, %rdi
movw -0x2(%rbp), %ax
andw $0x3ff, %ax             # imm = 0x3FF
movzwl %ax, %esi
callq 0x2340
movq %rax, %rdi
movq 0xd105(%rip), %rsi      # 0x14fb0
callq 0x2200
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(ADD_SP_Type)
int decode (const ADD_SP_Type data) {
  // complete
  if (opts.instrs) { 
    cout << "add r" << data.instr.add.rd << ", sp, #" << data.instr.add.imm*4 << endl;
  }
  return ADD_SP;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
leaq 0xd34e(%rip), %rax      # 0x15284
testb $0x1, 0x2(%rax)
je 0x7f9a
movq 0xd085(%rip), %rdi      # 0x14fc8
leaq 0x634a(%rip), %rsi      # 0xe294
callq 0x21d0
movq %rax, %rdi
movw -0x2(%rbp), %ax
shrw $0x8, %ax
andw $0x7, %ax
movzwl %ax, %esi
callq 0x2340
movq %rax, %rdi
leaq 0x632a(%rip), %rsi      # 0xe29a
callq 0x21d0
movq %rax, %rdi
movw -0x2(%rbp), %ax
andw $0xff, %ax
movzwl %ax, %esi
shll $0x2, %esi
callq 0x2360
movq %rax, %rdi
movq 0xd01b(%rip), %rsi      # 0x14fb0
callq 0x2200
movl $0xa, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: Lupo-CalPoly[P]cpe315-thumbsim/thumbsim_driver.cpp
// Function: Memory<Data8, Data32>::write(unsigned int, Data32)
void Memory<Data8, Data32>::write(const unsigned int addr, const Data32 data) {
  // data is in native format
  //   if little-endian, 3210 (MSB=3)
  // memory is in big-endian format (0123, MSB=0)
  int i;
  unsigned int myAddr = addr - base;
  if (size() < myAddr + 4) {
    m.resize(myAddr + 4, 0);
  }
  if (myAddr < lowest) lowest = myAddr;
  if (myAddr > highest) highest = myAddr;
  if (opts.writes) {
    cout << hex << addr << ": " << data << " ( ";
    for (i = 0 ; i < 4 ; i++) {
      cout << static_cast<unsigned int>(data.data_ubyte4(i)) << ' ';
    }
    cout << ")" << endl;
  }
  for (i = 0 ; i < 4 ; i++) {
    m[myAddr+i] = Data8(data.data_ubyte4(i));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edx, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl -0x14(%rbp), %eax
subl 0x18(%rdi), %eax
movl %eax, -0x1c(%rbp)
callq 0x8920
movl -0x1c(%rbp), %ecx
addl $0x4, %ecx
cmpl %ecx, %eax
jae 0x802a
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
leaq -0x1d(%rbp), %rdi
xorl %esi, %esi
callq 0x89f0
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x1d(%rbp), %rdx
callq 0x8940
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jae 0x8040
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x20(%rcx), %eax
jbe 0x8056
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x20(%rax)
leaq 0xd227(%rip), %rax      # 0x15284
testb $0x1, 0x3(%rax)
je 0x811d
movq 0xcf5a(%rip), %rdi      # 0x14fc8
leaq -0x5175(%rip), %rsi     # 0x2f00
callq 0x2090
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x60ad(%rip), %rsi      # 0xe13c
callq 0x21d0
movq %rax, -0x38(%rbp)
leaq -0x4(%rbp), %rdi
callq 0x2fd0
movq -0x38(%rbp), %rdi
movl %eax, %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x6216(%rip), %rsi      # 0xe2cc
callq 0x21d0
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x80fb
movl -0x18(%rbp), %esi
leaq -0x4(%rbp), %rdi
callq 0x8a10
movzbl %al, %esi
movq 0xceea(%rip), %rdi      # 0x14fc8
callq 0x22b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x2250
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x80c2
movq 0xcec6(%rip), %rdi      # 0x14fc8
leaq 0x6053(%rip), %rsi      # 0xe15c
callq 0x21d0
movq %rax, %rdi
movq 0xce98(%rip), %rsi      # 0x14fb0
callq 0x2200
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x8165
movl -0x18(%rbp), %esi
leaq -0x4(%rbp), %rdi
callq 0x8a10
leaq -0x1e(%rbp), %rdi
movzbl %al, %esi
callq 0x89f0
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x8a30
movb -0x1e(%rbp), %cl
movb %cl, (%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8124
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/thumbsim_driver.cpp
// Function: Memory<Data16, Data16>::write(unsigned int, Data16)
void Memory<Data16, Data16>::write(const unsigned int addr, const Data16 data) {
  // data is in native format
  int i;
  unsigned short myAddr = addr - base;
  if (size() < myAddr + 2) {
    m.resize(myAddr + 2, 0);
  }
  if (myAddr < lowest) lowest = myAddr;
  if (myAddr > highest) highest = myAddr;
  if (opts.writes) {
    cout << hex << addr << ": " << data << " ( ";
    for (i = 0 ; i < 2 ; i++) {
      cout << static_cast<unsigned int>(data.data_ubyte2(i)) << ' ';
    }
    cout << ")" << endl;
  }

  m[myAddr] = data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %dx, %ax
movw %ax, -0x2(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl -0x14(%rbp), %eax
subl 0x18(%rdi), %eax
movw %ax, -0x1a(%rbp)
callq 0x6530
movzwl -0x1a(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jae 0x81d9
movzwl -0x1a(%rbp), %eax
addl $0x2, %eax
cltq
movq %rax, -0x30(%rbp)
movw $0x0, -0x1e(%rbp)
leaq -0x1c(%rbp), %rdi
leaq -0x1e(%rbp), %rsi
callq 0x8b00
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x8a50
movq -0x28(%rbp), %rcx
movzwl -0x1a(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jae 0x81f1
movq -0x28(%rbp), %rax
movzwl -0x1a(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rcx
movzwl -0x1a(%rbp), %eax
cmpl 0x20(%rcx), %eax
jbe 0x8209
movq -0x28(%rbp), %rax
movzwl -0x1a(%rbp), %ecx
movl %ecx, 0x20(%rax)
leaq 0xd074(%rip), %rax      # 0x15284
testb $0x1, 0x3(%rax)
je 0x82d4
movq 0xcda7(%rip), %rdi      # 0x14fc8
leaq -0x5328(%rip), %rsi     # 0x2f00
callq 0x2090
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x5efa(%rip), %rsi      # 0xe13c
callq 0x21d0
movq %rax, -0x38(%rbp)
leaq -0x2(%rbp), %rdi
callq 0x8b20
movq -0x38(%rbp), %rdi
movzwl %ax, %esi
callq 0x2340
movq %rax, %rdi
leaq 0x6062(%rip), %rsi      # 0xe2cc
callq 0x21d0
movl $0x0, -0x18(%rbp)
cmpl $0x2, -0x18(%rbp)
jge 0x82b2
movl -0x18(%rbp), %eax
leaq -0x2(%rbp), %rdi
movswl %ax, %esi
callq 0x8b40
movzbl %al, %esi
movq 0xcd33(%rip), %rdi      # 0x14fc8
callq 0x22b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x2250
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8276
movq 0xcd0f(%rip), %rdi      # 0x14fc8
leaq 0x5e9c(%rip), %rsi      # 0xe15c
callq 0x21d0
movq %rax, %rdi
movq 0xcce1(%rip), %rsi      # 0x14fb0
callq 0x2200
movq -0x28(%rbp), %rdi
movzwl -0x1a(%rbp), %eax
movl %eax, %esi
callq 0x8b70
movw -0x2(%rbp), %cx
movw %cx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
// File: Lupo-CalPoly[P]cpe315-thumbsim/thumbsim_driver.cpp
// Function: Memory<Data8, Data32>::dump(DataType) const
void Memory<Data8, Data32>::dump(DataType dt) const {
  Data32 d(0);
  unsigned int addr;
  for (addr = lowest ; addr <= highest + 3 ; addr++) {
    unsigned int byte = addr & 0x3;
    d.set_data_ubyte4(byte, m[addr]);
    if ((byte == 0x3) && (dt == INSTRUCTIONS)) {
      cout << hex << d << endl;
    } else if ((byte == 0x3) && (dt == DATA) && (d.data_uint() != 0)) {
      cout << hex << addr - 3 + getBase() << ": " << d << endl;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x2c80
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %eax
movl 0x20(%rcx), %ecx
addl $0x3, %ecx
cmpl %ecx, %eax
ja 0x85d6
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %eax
andl $0x3, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %eax
movl %eax, %esi
callq 0x8bb0
movq %rax, %rdi
callq 0x8bd0
movl -0x2c(%rbp), %esi
leaq -0x10(%rbp), %rdi
movzbl %al, %edx
callq 0x8ca0
cmpl $0x3, -0x1c(%rbp)
jne 0x8539
cmpl $0x0, -0xc(%rbp)
jne 0x8539
movq 0xcac7(%rip), %rdi      # 0x14fc8
leaq -0x5608(%rip), %rsi     # 0x2f00
callq 0x2090
movq %rax, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x2fd0
movq -0x38(%rbp), %rdi
movl %eax, %esi
callq 0x22b0
movq %rax, %rdi
movq 0xca81(%rip), %rsi      # 0x14fb0
callq 0x2200
jmp 0x85c6
cmpl $0x3, -0x1c(%rbp)
jne 0x85c4
cmpl $0x1, -0xc(%rbp)
jne 0x85c4
leaq -0x10(%rbp), %rdi
callq 0x50d0
cmpl $0x0, %eax
je 0x85c4
movq 0xca6a(%rip), %rdi      # 0x14fc8
leaq -0x5665(%rip), %rsi     # 0x2f00
callq 0x2090
movq -0x28(%rbp), %rdi
movq %rax, -0x48(%rbp)
movl -0x18(%rbp), %eax
subl $0x3, %eax
movl %eax, -0x4c(%rbp)
callq 0x8cd0
movl -0x4c(%rbp), %esi
movq -0x48(%rbp), %rdi
addl %eax, %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x5ba4(%rip), %rsi      # 0xe13c
callq 0x21d0
movq %rax, -0x40(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x2fd0
movq -0x40(%rbp), %rdi
movl %eax, %esi
callq 0x22b0
movq %rax, %rdi
movq 0xc9f1(%rip), %rsi      # 0x14fb0
callq 0x2200
jmp 0x85c6
jmp 0x85c8
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x84a5
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/thumbsim_driver.cpp
// Function: swizzle(unsigned int)
unsigned int swizzle(unsigned int d) {
  return (((d >> 24) & 0xff) |
          ((d >> 8)  & 0xff00) |
          ((d << 8)  & 0xff0000) |
          ((d << 24) & 0xff000000));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movl -0x4(%rbp), %ecx
shrl $0x8, %ecx
andl $0xff00, %ecx           # imm = 0xFF00
orl %ecx, %eax
movl -0x4(%rbp), %ecx
shll $0x8, %ecx
andl $0xff0000, %ecx         # imm = 0xFF0000
orl %ecx, %eax
movl -0x4(%rbp), %ecx
shll $0x18, %ecx
andl $0xff000000, %ecx       # imm = 0xFF000000
orl %ecx, %eax
popq %rbp
retq
nop
// File: Lupo-CalPoly[P]cpe315-thumbsim/./thumbsim.hpp
// Function: Data32::Data32(unsigned char const&, unsigned char const&, unsigned char const&, unsigned char const&)
Data32(const unsigned char & d0, 
            const unsigned char & d1, 
            const unsigned char & d2, 
            const unsigned char & d3) { 
         set_data_ubyte4(0, d0);
         set_data_ubyte4(1, d1);
         set_data_ubyte4(2, d2);
         set_data_ubyte4(3, d3);
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rax
xorl %esi, %esi
movzbl (%rax), %edx
callq 0x8ca0
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movl $0x1, %esi
movzbl (%rax), %edx
callq 0x8ca0
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movl $0x2, %esi
movzbl (%rax), %edx
callq 0x8ca0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movl $0x3, %esi
movzbl (%rax), %edx
callq 0x8ca0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/parse.cpp
// Function: parse(char const*)
void parse(const char * file) {
  ifstream in(file);
  string s;
  unsigned int addr;
  in >> hex;                    // in takes hex numbers
  in >> s;
  if (s != "PC") {
    exit(1);
  }
  in >> addr;
  pc = addr;
  parseMem(in, "instruction");
  parseMem(in, "data");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
movl $0x8, %edx
callq 0x23a0
leaq -0x230(%rbp), %rdi
callq 0x22d0
movq -0x2a0(%rbp), %rdi
leaq -0x8805(%rip), %rsi     # 0x2f00
callq 0x2330
jmp 0xb70c
leaq -0x210(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x2290
jmp 0xb721
leaq 0x2d02(%rip), %rsi      # 0xe42a
leaq -0x230(%rbp), %rdi
callq 0xb9e0
movb %al, -0x2a1(%rbp)
jmp 0xb73c
movb -0x2a1(%rbp), %al
testb $0x1, %al
jne 0xb748
jmp 0xb769
movl $0x1, %edi
callq 0x2260
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0xb8e9
leaq -0x210(%rbp), %rdi
leaq -0x234(%rbp), %rsi
callq 0x2030
jmp 0xb77e
movl -0x234(%rbp), %esi
leaq 0x9af5(%rip), %rdi      # 0x15280
callq 0xba10
jmp 0xb792
leaq -0x269(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x2380
movq -0x2b0(%rbp), %rdx
leaq 0x2c1f(%rip), %rsi      # 0xe3d2
leaq -0x268(%rbp), %rdi
callq 0xba40
jmp 0xb7c1
leaq -0x210(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0xb1b0
jmp 0xb7d6
leaq -0x268(%rbp), %rdi
callq 0x2110
leaq -0x269(%rbp), %rdi
callq 0x2220
leaq -0x291(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x2380
movq -0x2b8(%rbp), %rdx
leaq 0x2ba7(%rip), %rsi      # 0xe3b6
leaq -0x290(%rbp), %rdi
callq 0xba40
jmp 0xb81d
leaq -0x210(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0xb1b0
jmp 0xb832
leaq -0x290(%rbp), %rdi
callq 0x2110
leaq -0x291(%rbp), %rdi
callq 0x2220
leaq -0x230(%rbp), %rdi
callq 0x2110
leaq -0x210(%rbp), %rdi
callq 0x2060
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0xb89d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x2110
leaq -0x269(%rbp), %rdi
callq 0x2220
jmp 0xb8e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0xb8dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x2110
leaq -0x291(%rbp), %rdi
callq 0x2220
leaq -0x230(%rbp), %rdi
callq 0x2110
leaq -0x210(%rbp), %rdi
callq 0x2060
movq -0x240(%rbp), %rdi
callq 0x2370
nopl (%rax)
// File: Lupo-CalPoly[P]cpe315-thumbsim/execute.cpp
// Function: checkCondition(unsigned short)
static int checkCondition(unsigned short cond) {
  switch(cond) {
    case EQ:
      if (flags.Z == 1) {
        return TRUE;
      }
      break;
    case NE:
      break;
    case CS:
      break;
    case CC:
      break;
    case MI:
      break;
    case PL:
      break;
    case VS:
      break;
    case VC:
      break;
    case HI:
      break;
    case LS:
      break;
    case GE:
      break;
    case LT:
      break;
    case GT:
      break;
    case LE:
      break;
    case AL:
      return TRUE;
      break;
  }
  return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %di, %ax
movw %ax, -0x6(%rbp)
movzwl -0x6(%rbp), %eax
movq %rax, -0x10(%rbp)
subq $0xe, %rax
ja 0xcf97
movq -0x10(%rbp), %rax
leaq 0x15c0(%rip), %rcx      # 0xe514
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x837d(%rip), %eax      # 0x152e1
cmpl $0x1, %eax
jne 0xcf72
movl $0x1, -0x4(%rbp)
jmp 0xcf9e
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
jmp 0xcf97
movl $0x1, -0x4(%rbp)
jmp 0xcf9e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: amukherj[P]concurrencyts/future.cc
// Function: basic_future_state()
void basic_future_state() {
  std::experimental::future_state<int> f;

  std::thread t([&f]() {
    auto val = f.get();
    std::cout << val << '\n';
  });

  std::thread t0([&f]() {
    f.wait();
    std::cout << "Done\n";
  });

  std::thread t1([&f]() {
    auto val = f.get();
    std::cout << val << '\n';
  });

  std::this_thread::sleep_for(std::chrono::seconds(2));
  f.emplace(10);

  t.join();
  t0.join();
  t1.join();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq -0x70(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0xaba0
movq -0xc8(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3610
jmp 0x34a5
leaq -0x70(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x36d0
jmp 0x34c5
leaq -0x70(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3790
jmp 0x34e5
movl $0x2, -0xbc(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0xbc(%rbp), %rsi
callq 0xaca0
jmp 0x3504
leaq -0xb8(%rbp), %rdi
callq 0xabf0
jmp 0x3512
movl $0xa, -0xc0(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xacc0
jmp 0x352e
leaq -0x78(%rbp), %rdi
callq 0x32a0
jmp 0x3539
leaq -0x98(%rbp), %rdi
callq 0x32a0
jmp 0x3547
leaq -0xa8(%rbp), %rdi
callq 0x32a0
jmp 0x3555
leaq -0xa8(%rbp), %rdi
callq 0xad90
leaq -0x98(%rbp), %rdi
callq 0xad90
leaq -0x78(%rbp), %rdi
callq 0xad90
leaq -0x70(%rbp), %rdi
callq 0xadc0
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x35f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x35ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x35e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xad90
leaq -0x98(%rbp), %rdi
callq 0xad90
leaq -0x78(%rbp), %rdi
callq 0xad90
leaq -0x70(%rbp), %rdi
callq 0xadc0
movq -0x88(%rbp), %rdi
callq 0x32d0
nopl (%rax)
// File: amukherj[P]concurrencyts/future.cc
// Function: promise_to_future()
void promise_to_future() {
  std::experimental::promise<int> prom;
  auto fut = prom.get_future();

  std::thread t([&prom]() {
    std::this_thread::sleep_for(std::chrono::seconds(2));
    prom.set(10);
  });
  t.detach();

  std::cout << fut.get() << '\n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0xae10
movq -0x48(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xae30
jmp 0x3874
leaq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3940
jmp 0x388b
leaq -0x38(%rbp), %rdi
callq 0x32c0
jmp 0x3896
leaq -0x20(%rbp), %rdi
callq 0xaea0
movq %rax, -0x50(%rbp)
jmp 0x38a5
movq -0x50(%rbp), %rax
movl (%rax), %esi
movq 0x1f71e(%rip), %rdi     # 0x22fd0
callq 0x32b0
movq %rax, -0x58(%rbp)
jmp 0x38bd
movq -0x58(%rbp), %rdi
movl $0xa, %esi
callq 0x3210
jmp 0x38cd
leaq -0x38(%rbp), %rdi
callq 0xad90
leaq -0x20(%rbp), %rdi
callq 0xaed0
leaq -0x10(%rbp), %rdi
callq 0xaef0
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3928
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x391f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xad90
leaq -0x20(%rbp), %rdi
callq 0xaed0
leaq -0x10(%rbp), %rdi
callq 0xaef0
movq -0x28(%rbp), %rdi
callq 0x32d0
nopw (%rax,%rax)
// File: amukherj[P]concurrencyts/future.cc
// Function: async_to_promise()
void async_to_promise() {
  std::experimental::future<int> f = std::experimental::async([](int a, int b, int x)->int {
    std::this_thread::sleep_for(std::chrono::seconds(4));
    return a + b + x;
  }, 10, 20, 30);
  std::cout << f.get() << '\n';

  auto f0 =
  std::experimental::async([](std::string a, const std::string b, std::string&& x)->std::string {
    std::this_thread::sleep_for(std::chrono::seconds(4));
    return a + " " + b + " " + x;
  }, "hello", "whats'", "up").then([](std::string s, std::string n) ->std::string {
    std::this_thread::sleep_for(std::chrono::seconds(2));
    return s + n;
  }, "?").then([](std::string s)->int {
    return s.size();
  });
  std::cout << f0.get() << '\n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl $0xa, -0x18(%rbp)
movl $0x14, -0x1c(%rbp)
movl $0x1e, -0x20(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x78(%rbp)
leaq -0x11(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
leaq -0x20(%rbp), %r8
callq 0x3ba0
movq -0x78(%rbp), %rdi
callq 0xaea0
movq %rax, -0x70(%rbp)
jmp 0x3a4c
movq -0x70(%rbp), %rax
movl (%rax), %esi
movq 0x1f577(%rip), %rdi     # 0x22fd0
callq 0x32b0
movq %rax, -0x80(%rbp)
jmp 0x3a64
movq -0x80(%rbp), %rdi
movl $0xa, %esi
callq 0x3210
jmp 0x3a74
leaq 0x10589(%rip), %rdx     # 0x14004
leaq 0x10588(%rip), %rcx     # 0x1400a
leaq 0x10588(%rip), %r8      # 0x14011
leaq -0x60(%rbp), %rdi
leaq -0x61(%rbp), %rsi
callq 0x3cc0
jmp 0x3a98
leaq 0x10575(%rip), %rcx     # 0x14014
leaq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x62(%rbp), %rdx
callq 0x3de0
jmp 0x3ab2
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x63(%rbp), %rdx
callq 0x3f50
jmp 0x3ac5
leaq -0x50(%rbp), %rdi
callq 0xaf10
leaq -0x60(%rbp), %rdi
callq 0xaf10
leaq -0x40(%rbp), %rdi
callq 0xaea0
movq %rax, -0x88(%rbp)
jmp 0x3ae9
movq -0x88(%rbp), %rax
movl (%rax), %esi
movq 0x1f4d7(%rip), %rdi     # 0x22fd0
callq 0x32b0
movq %rax, -0x90(%rbp)
jmp 0x3b07
movq -0x90(%rbp), %rdi
movl $0xa, %esi
callq 0x3210
jmp 0x3b1a
leaq -0x40(%rbp), %rdi
callq 0xaed0
leaq -0x10(%rbp), %rdi
callq 0xaed0
addq $0x90, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3b86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x3b66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xaf10
leaq -0x60(%rbp), %rdi
callq 0xaf10
jmp 0x3b86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xaed0
leaq -0x10(%rbp), %rdi
callq 0xaed0
movq -0x28(%rbp), %rdi
callq 0x32d0
nopl (%rax,%rax)
// File: amukherj[P]concurrencyts/./future.h
// Function: concurrencyts::future<std::result_of<async_to_promise()::$_0 (int&&, int&&, int&&)>::type> concurrencyts::async<async_to_promise()::$_0, int, int, int>(async_to_promise()::$_0&&, int&&, int&&, int&&)
auto async(F&& callable, Args&&... args) -> 
    future<typename std::result_of_t<F(Args&&...)>>
{
  using ret_type = typename std::result_of_t<F(Args&&...)>;
  promise<ret_type> prom;
  auto fut = prom.get_future();

  std::thread t([&callable, &args...](promise<ret_type> promise) {
    try {
      promise.set(callable(std::forward<Args&&>(args)...));
    } catch (std::exception& e) {
      promise.set_exception(e);
    }
  }, std::move(prom));
  t.detach();

  return fut;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0xae10
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movb $0x0, -0x39(%rbp)
callq 0xae30
jmp 0x3bf3
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x59e0
jmp 0x3c26
leaq -0x58(%rbp), %rdi
callq 0x32c0
jmp 0x3c31
movb $0x1, -0x39(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xad90
testb $0x1, -0x39(%rbp)
jne 0x3c85
jmp 0x3c79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3caa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3c9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xad90
jmp 0x3c9e
movq -0x88(%rbp), %rdi
callq 0xaed0
leaq -0x38(%rbp), %rdi
callq 0xaef0
movq -0x90(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0xaed0
leaq -0x38(%rbp), %rdi
callq 0xaef0
movq -0x48(%rbp), %rdi
callq 0x32d0
nopl (%rax)
// File: amukherj[P]concurrencyts/./future.h
// Function: concurrencyts::future<std::result_of<async_to_promise()::$_2 (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [2])>::type> concurrencyts::future<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::then<async_to_promise()::$_2, char const (&) [2]>(async_to_promise()::$_2&&, char const (&) [2])
auto then(F&& callable, Args&&... args) ->
      future<std::result_of_t<F(T, Args&&...)>>
  {
    using ret_type = std::result_of_t<F(T, Args&&...)>;
    auto next_state = std::make_shared<future_state<ret_type>>();
    future<ret_type> ret(next_state);

    std::thread t([ss = next_state, &callable, &args...](future<T> f) {
      try {
        ss->emplace(callable(f.get(), std::forward<Args&&>(args)...));
      } catch (std::exception& e) {
        ss->set_exception(e);
      }
    }, std::move(*this));
    t.detach();

    return ret;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0xde90
movq -0x98(%rbp), %rsi
movb $0x0, -0x31(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0xe8e0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xe910
jmp 0x3e57
leaq -0x48(%rbp), %rdi
callq 0xba70
leaq -0x80(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
leaq -0x30(%rbp), %rsi
callq 0xe8e0
movq -0xb0(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x6830
jmp 0x3e9d
leaq -0x80(%rbp), %rdi
callq 0x68f0
leaq -0x60(%rbp), %rdi
callq 0x32c0
jmp 0x3eb1
movb $0x1, -0x31(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xad90
testb $0x1, -0x31(%rbp)
jne 0x3f17
jmp 0x3f0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xba70
jmp 0x3f3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x68f0
jmp 0x3f30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xad90
jmp 0x3f30
movq -0x90(%rbp), %rdi
callq 0xaf10
leaq -0x30(%rbp), %rdi
callq 0xba70
movq -0xa8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0xaf10
leaq -0x30(%rbp), %rdi
callq 0xba70
movq -0x50(%rbp), %rdi
callq 0x32d0
nop
// File: amukherj[P]concurrencyts/future.cc
// Function: when_all()
void when_all() {
  std::vector<std::experimental::future<std::string>> futures;

  futures.push_back( std::experimental::async([]()->std::string {
    std::this_thread::sleep_for(std::chrono::seconds(4));
    return "Hello";
  }) );
  futures.push_back( std::experimental::async([]()->std::string {
    std::this_thread::sleep_for(std::chrono::seconds(3));
    return "World";
  }) );

  auto rf = std::experimental::when_all(futures.begin(), futures.end());
  auto result = std::move(rf.get());
  for (auto& r: result) {
    std::cout << "Got: " << r.get() << '\n';
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
leaq -0x18(%rbp), %rdi
callq 0xaf30
leaq -0x28(%rbp), %rdi
leaq -0x29(%rbp), %rsi
callq 0x42e0
jmp 0x40c3
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xaf50
jmp 0x40d2
leaq -0x28(%rbp), %rdi
callq 0xaf10
leaq -0x50(%rbp), %rdi
leaq -0x51(%rbp), %rsi
callq 0x43c0
jmp 0x40ea
leaq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xaf50
jmp 0x40f9
leaq -0x50(%rbp), %rdi
callq 0xaf10
leaq -0x18(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0xb0d0
movq -0xb8(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0xb100
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0xaf80
jmp 0x4139
leaq -0x68(%rbp), %rdi
callq 0xb130
movq %rax, -0xc0(%rbp)
jmp 0x414b
movq -0xc0(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0xb160
leaq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0xb0d0
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0xb100
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xb190
testb $0x1, %al
jne 0x41ae
jmp 0x429b
leaq -0xa0(%rbp), %rdi
callq 0xb1d0
movq %rax, -0xb0(%rbp)
movq 0x1ee08(%rip), %rdi     # 0x22fd0
leaq 0xfe47(%rip), %rsi      # 0x14016
callq 0x31c0
movq %rax, -0xc8(%rbp)
jmp 0x41dd
movq -0xb0(%rbp), %rdi
callq 0xb1f0
movq %rax, -0xd0(%rbp)
jmp 0x41f2
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdi
callq 0x3190
movq %rax, -0xd8(%rbp)
jmp 0x420e
movq -0xd8(%rbp), %rdi
movl $0xa, %esi
callq 0x3210
jmp 0x4221
jmp 0x4223
leaq -0xa0(%rbp), %rdi
callq 0xb220
jmp 0x4192
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x42cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xaf10
jmp 0x42cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xaf10
jmp 0x42cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x42c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xb240
jmp 0x42c2
leaq -0x90(%rbp), %rdi
callq 0xb240
leaq -0x68(%rbp), %rdi
callq 0xb2a0
leaq -0x18(%rbp), %rdi
callq 0xb240
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0xb2a0
leaq -0x18(%rbp), %rdi
callq 0xb240
movq -0x38(%rbp), %rdi
callq 0x32d0
nopl (%rax)
// File: amukherj[P]concurrencyts/future.cc
// Function: main
int main() {
  basic_future_state();
  promise_to_future();
  async_to_promise();
  when_all();
  when_any();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x3470
callq 0x3850
callq 0x3a00
callq 0x40a0
callq 0x44a0
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: amukherj[P]concurrencyts/./future.h
// Function: void concurrencyts::future_state<int>::emplace<int>(int&&)
void emplace(Args&&... args) {
    std::unique_lock<std::mutex> ul(mtx);
    assert(!is_available && !is_complete);
    try {
      new (reinterpret_cast<T*>(&data)) T{std::forward<Args&&>(args)...};
      is_available = true;
    } catch (...) {
      eptr = std::current_exception();
    }
    is_complete = true;
    ul.unlock();

    completed.notify_all();
    notify_wait_queue();
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x38(%rbp)
addq $0x30, %rsi
leaq -0x20(%rbp), %rdi
callq 0xc290
movq -0x38(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x5c(%rcx)
movb %al, -0x2d(%rbp)
jne 0xad00
movq -0x38(%rbp), %rax
movb 0x5d(%rax), %al
xorb $-0x1, %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0xad09
jmp 0xad0b
jmp 0xad2a
leaq 0x9310(%rip), %rdi      # 0x14022
leaq 0x9327(%rip), %rsi      # 0x14040
movl $0x27, %edx
leaq 0x9326(%rip), %rcx      # 0x1404b
callq 0x3120
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x58(%rax)
movb $0x1, 0x5c(%rax)
movb $0x1, 0x5d(%rax)
leaq -0x20(%rbp), %rdi
callq 0xc470
jmp 0xad4a
movq -0x38(%rbp), %rdi
callq 0x3290
movq -0x38(%rbp), %rdi
callq 0xcb50
jmp 0xad5e
leaq -0x20(%rbp), %rdi
callq 0xc380
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xc380
movq -0x28(%rbp), %rdi
callq 0x32d0
nopl (%rax,%rax)
// File: amukherj[P]concurrencyts/./future.h
// Function: concurrencyts::future_state<int>::get()
T& get() {
    std::unique_lock<std::mutex> ul(mtx);
    completed.wait(ul, [this]()->bool { return is_complete; });

    if (eptr) {
      std::rethrow_exception(eptr);
    }

    return *(reinterpret_cast<T*>(&data));
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x48(%rbp)
addq $0x30, %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0xc290
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rdx
callq 0xc2d0
jmp 0xc1fc
movq -0x48(%rbp), %rdi
addq $0x68, %rdi
callq 0xc320
testb $0x1, %al
jne 0xc20f
jmp 0xc254
movq -0x48(%rbp), %rsi
addq $0x68, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0xc340
movq -0x50(%rbp), %rdi
callq 0x31f0
jmp 0xc22f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xc273
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xbe40
jmp 0xc273
movq -0x48(%rbp), %rax
addq $0x58, %rax
movq %rax, -0x58(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xc380
movq -0x58(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0xc380
movq -0x28(%rbp), %rdi
callq 0x32d0
nopw %cs:(%rax,%rax)
nop
// File: amukherj[P]concurrencyts/./future.h
// Function: concurrencyts::future_state<int>::wait()
void wait() {
    std::unique_lock<std::mutex> ul(mtx);
    completed.wait(ul, [this]()->bool { return is_complete; });

    if (eptr) {
      std::rethrow_exception(eptr);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x48(%rbp)
addq $0x30, %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0xc290
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rdx
callq 0xc840
jmp 0xc7bc
movq -0x48(%rbp), %rdi
addq $0x68, %rdi
callq 0xc320
testb $0x1, %al
jne 0xc7cf
jmp 0xc814
movq -0x48(%rbp), %rsi
addq $0x68, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0xc340
movq -0x50(%rbp), %rdi
callq 0x31f0
jmp 0xc7ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xc823
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xbe40
jmp 0xc823
leaq -0x18(%rbp), %rdi
callq 0xc380
addq $0x50, %rsp
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0xc380
movq -0x28(%rbp), %rdi
callq 0x32d0
nopw %cs:(%rax,%rax)
nop