LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Serfati[P]Heroes-of-Might-and-Magic-3/Creature.cpp
// Function: Creature::creaType[abi:cxx11](int)
string Creature::creaType(int vtype) {
    switch ( vtype ) {
        case 0:
            return "Zombie";
        case 1:
            return "Archer";
        case 2:
            return "Vampire";
        case 3:
            return "Wizard";
        case 4:
            return "Black_Dragon";
        default:
            return "Unknown";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x38(%rbp)
subq $0x4, %rax
ja 0x11ed7
movq -0x38(%rbp), %rax
leaq 0x1a13(%rip), %rcx      # 0x13770
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x15(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x4530
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rdx
leaq 0x1a45(%rip), %rsi      # 0x137c7
callq 0x4c10
jmp 0x11d89
leaq -0x15(%rbp), %rdi
callq 0x4360
jmp 0x11f1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x15(%rbp), %rdi
callq 0x4360
jmp 0x11f29
leaq -0x25(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x4530
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0x1a01(%rip), %rsi      # 0x137ce
callq 0x4c10
jmp 0x11dd4
leaq -0x25(%rbp), %rdi
callq 0x4360
jmp 0x11f1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x25(%rbp), %rdi
callq 0x4360
jmp 0x11f29
leaq -0x26(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x4530
movq -0x48(%rbp), %rdi
movq -0x60(%rbp), %rdx
leaq 0x19bd(%rip), %rsi      # 0x137d5
callq 0x4c10
jmp 0x11e1f
leaq -0x26(%rbp), %rdi
callq 0x4360
jmp 0x11f1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x26(%rbp), %rdi
callq 0x4360
jmp 0x11f29
leaq -0x27(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x4530
movq -0x48(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq 0x197a(%rip), %rsi      # 0x137dd
callq 0x4c10
jmp 0x11e6a
leaq -0x27(%rbp), %rdi
callq 0x4360
jmp 0x11f1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x27(%rbp), %rdi
callq 0x4360
jmp 0x11f29
leaq -0x28(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x4530
movq -0x48(%rbp), %rdi
movq -0x70(%rbp), %rdx
leaq 0x1936(%rip), %rsi      # 0x137e4
callq 0x4c10
jmp 0x11eb5
leaq -0x28(%rbp), %rdi
callq 0x4360
jmp 0x11f1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4360
jmp 0x11f29
leaq -0x29(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x4530
movq -0x48(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x18fe(%rip), %rsi      # 0x137f1
callq 0x4c10
jmp 0x11efa
leaq -0x29(%rbp), %rdi
callq 0x4360
jmp 0x11f1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x4360
jmp 0x11f29
movq -0x40(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x4520
nopw %cs:(%rax,%rax)
// File: Serfati[P]Heroes-of-Might-and-Magic-3/Zombie.cpp
// Function: Zombie::attackAnother(Creature&)
double Zombie::attackAnother(Creature &c) {
    this->specialAbility(c);
    double x = (double) getAttackPoints();
    double y = (double) c.getDefendPoints();
    return x / y;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x18(%rbp), %xmm0
divsd -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Serfati[P]Heroes-of-Might-and-Magic-3/Thief.cpp
// Function: Thief::specialAbility(Hero&)
bool Thief::specialAbility(Hero &toRob) {
    if ( isAlive ) {
        if ( toRob.getGold() > 70 ) {
            this->addGold(70);
            toRob.setGold(toRob.getGold() - 70.0);
            return 1;
        } else {
            addGold(toRob.getGold());
            toRob.setGold(0.0);
            return 1;
        }
    }
    std::cout << "You died!" << endl;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
testb $0x1, 0x3a(%rax)
je 0x12a26
movq -0x18(%rbp), %rdi
callq 0xf110
movsd 0xe79(%rip), %xmm1      # 0x13838
ucomisd %xmm1, %xmm0
jbe 0x12a02
movq -0x20(%rbp), %rdi
movsd 0xe67(%rip), %xmm0      # 0x13838
callq 0x11040
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf110
movq -0x28(%rbp), %rdi
movsd 0xe45(%rip), %xmm1      # 0x13838
subsd %xmm1, %xmm0
callq 0xf8a0
movb $0x1, -0x1(%rbp)
jmp 0x12a4c
movq -0x18(%rbp), %rdi
callq 0xf110
movq -0x20(%rbp), %rdi
callq 0x11040
movq -0x18(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0xf8a0
movb $0x1, -0x1(%rbp)
jmp 0x12a4c
movq 0x9593(%rip), %rdi      # 0x1bfc0
leaq 0xe0c(%rip), %rsi       # 0x13840
callq 0x4310
movq %rax, %rdi
movq 0x956d(%rip), %rsi      # 0x1bfb0
callq 0x4340
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Serfati[P]Heroes-of-Might-and-Magic-3/Warrior.cpp
// Function: Warrior::specialAbility(Hero&)
bool Warrior::specialAbility(Hero &s) {
    if ( isAlive ) {
        addGold(50);
        cout << "Gold added successfully" << endl;
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
testb $0x1, 0x3a(%rax)
je 0x12bf7
movq -0x20(%rbp), %rdi
movsd 0xc8e(%rip), %xmm0      # 0x13858
callq 0x11040
movq 0x93ea(%rip), %rdi      # 0x1bfc0
leaq 0xc83(%rip), %rsi       # 0x13860
callq 0x4310
movq %rax, %rdi
movq 0x93c4(%rip), %rsi      # 0x1bfb0
callq 0x4340
movb $0x1, -0x1(%rbp)
jmp 0x12bfb
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Serfati[P]Heroes-of-Might-and-Magic-3/Necromancer.cpp
// Function: Necromancer::specialAbility(Hero&)
bool Necromancer::specialAbility(Hero &s) {
    if ( isAlive ) {
        army->addUnit(0,1);
        cout << "Zombie added ‫‪successfully‬‬" << endl;
        return 1;
    }
    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
testb $0x1, 0x3a(%rax)
je 0x12d4a
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xc100
movq 0x9297(%rip), %rdi      # 0x1bfc0
leaq 0xb51(%rip), %rsi       # 0x13881
callq 0x4310
movq %rax, %rdi
movq 0x9271(%rip), %rsi      # 0x1bfb0
callq 0x4340
movb $0x1, -0x1(%rbp)
jmp 0x12d4e
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: yuroitaki[P]enigma_machine/enigma.cpp
// Function: Enigma::~Enigma()
Enigma::~Enigma(){
  delete plugb_ref;
  delete config_obj;
  for(auto iterator=rotor_vector.begin();iterator!=rotor_vector.end();iterator++){
    delete *iterator;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x29a9
movq -0x28(%rbp), %rdi
callq 0x2dc0
movq -0x28(%rbp), %rdi
movl $0x38, %esi
callq 0x2130
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x29d1
movq -0x38(%rbp), %rdi
callq 0x2df0
movq -0x38(%rbp), %rdi
movl $0x48, %esi
callq 0x2130
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
callq 0x2e10
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
callq 0x2e80
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2e40
testb $0x1, %al
jne 0x2a06
jmp 0x2a46
leaq -0x10(%rbp), %rdi
callq 0x2eb0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x2a33
movq -0x40(%rbp), %rdi
callq 0x2ed0
movq -0x40(%rbp), %rdi
movl $0x60, %esi
callq 0x2130
jmp 0x2a35
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x2f10
movq %rax, -0x20(%rbp)
jmp 0x29e2
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
callq 0x2d60
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: yuroitaki[P]enigma_machine/enigma.cpp
// Function: Enigma::run()
void Enigma::run(){
  char charac;
  int code;
  int count = 0;
  
  while(cin >> ws >> charac){ 
    if((charac>=CONVERSION)&&(charac<=CONVERSION+25)){        
      code = static_cast<int>(charac)-CONVERSION;
      encrypt(code);
      count ++;
    }else{
      cerr << charac;
      throw INVALID_INPUT_CHARACTER;
    }
  }
  if ((count==0)&&(cin.fail())){           
    cerr << "The input file";
    throw ERROR_OPENING_CONFIGURATION_FILE;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq 0x9396(%rip), %rdi      # 0xbfd8
movq 0x9377(%rip), %rsi      # 0xbfc0
callq 0x2080
movq %rax, %rdi
leaq -0x9(%rbp), %rsi
callq 0x2180
movq %rax, %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x2170
testb $0x1, %al
jne 0x2c6f
jmp 0x2cdb
movsbl -0x9(%rbp), %eax
cmpl $0x41, %eax
jl 0x2ca3
movsbl -0x9(%rbp), %eax
cmpl $0x5a, %eax
jg 0x2ca3
movq -0x20(%rbp), %rdi
movsbl -0x9(%rbp), %eax
subl $0x41, %eax
movl %eax, -0x10(%rbp)
leaq -0x10(%rbp), %rsi
callq 0x2a60
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2cd6
movq 0x9346(%rip), %rdi      # 0xbff0
movsbl -0x9(%rbp), %esi
callq 0x2160
movl $0x4, %edi
callq 0x20b0
movq %rax, %rdi
movl $0x2, (%rdi)
movq 0x92d3(%rip), %rsi      # 0xbfa0
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
jmp 0x2c3b
cmpl $0x0, -0x14(%rbp)
jne 0x2d37
movq 0x92f0(%rip), %rax      # 0xbfd8
movq (%rax), %rax
movq 0x92e6(%rip), %rdi      # 0xbfd8
addq -0x18(%rax), %rdi
callq 0x2030
testb $0x1, %al
jne 0x2d01
jmp 0x2d37
movq 0x92e8(%rip), %rdi      # 0xbff0
leaq 0x5493(%rip), %rsi      # 0x81a2
callq 0x2110
movl $0x4, %edi
callq 0x20b0
movq %rax, %rdi
movl $0xb, (%rdi)
movq 0x9272(%rip), %rsi      # 0xbfa0
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: yuroitaki[P]enigma_machine/config.cpp
// Function: Config::Config(int, char**)
Config::Config(int arg_ct,char**arg_vl){      
  arg_count = arg_ct;
  arg_value = arg_vl;
  rotor_count = 0;
  
  if ((arg_ct < 3)||(arg_ct ==4))
    throw INSUFFICIENT_NUMBER_OF_PARAMETERS;
  
  int last_index = arg_ct-1;
  plugboard_file = arg_vl[1];
  reflector_file = arg_vl[2];
  
  if (arg_ct > 3){
    rotor_pos_file = arg_vl[last_index];
    for (int i=3;i<last_index;i++){
      rotor_files.push_back(arg_value[i]);
      rotor_count++;
    }
  }
  check_pb_file();
  check_rf_file();

  if(arg_ct >3){
    for (int i=0;i<rotor_count;i++){
      check_rot_file(rotor_files[i],i);   
    }
    check_rot_pos_file();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x28, %rdi
movq %rdi, -0x40(%rbp)
callq 0x5800
movq -0x38(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x10(%rax)
cmpl $0x3, -0xc(%rbp)
jl 0x3d9c
cmpl $0x4, -0xc(%rbp)
jne 0x3dde
movl $0x4, %edi
callq 0x20b0
movq %rax, %rdi
movl $0x1, (%rdi)
movq 0x81ea(%rip), %rsi      # 0xbfa0
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
jmp 0x3ede
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x32d0
jmp 0x3ed5
movq -0x38(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x20(%rax)
cmpl $0x3, -0xc(%rbp)
jle 0x3e64
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x40(%rax)
movl $0x3, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x3e62
movq -0x38(%rbp), %rax
movq %rax, %rdi
addq $0x28, %rdi
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
leaq (%rax,%rcx,8), %rsi
callq 0x5820
jmp 0x3e4a
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3e24
jmp 0x3e64
movq -0x38(%rbp), %rdi
callq 0x3ee0
jmp 0x3e6f
movq -0x38(%rbp), %rdi
callq 0x44a0
jmp 0x3e7a
cmpl $0x3, -0xc(%rbp)
jle 0x3ecf
movl $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movl -0x30(%rbp), %eax
cmpl 0x10(%rcx), %eax
jge 0x3ec2
movq -0x38(%rbp), %rdi
addq $0x28, %rdi
movslq -0x30(%rbp), %rsi
callq 0x5890
movq -0x38(%rbp), %rdi
movq (%rax), %rsi
movl -0x30(%rbp), %edx
callq 0x4a80
jmp 0x3eb5
jmp 0x3eb7
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x3e87
movq -0x38(%rbp), %rdi
callq 0x5400
jmp 0x3ecd
jmp 0x3ecf
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x21f0
nop
// File: yuroitaki[P]enigma_machine/config.cpp
// Function: Config::get_file(int)
const char* Config::get_file(int filecode){
  switch(filecode){
  case PB: 
    return plugboard_file;
  case RF:
    return reflector_file;
  case RP:
    return rotor_pos_file; 
  default: return "No files found!";
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
subl $0x64, %eax
je 0x5778
jmp 0x5760
movl -0x18(%rbp), %eax
subl $0xc8, %eax
je 0x5786
jmp 0x576c
movl -0x18(%rbp), %eax
subl $0x12c, %eax            # imm = 0x12C
je 0x5794
jmp 0x57a2
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x57ad
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x57ad
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x57ad
leaq 0x2a22(%rip), %rax      # 0x81cb
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: yuroitaki[P]enigma_machine/plugboard_reflector.cpp
// Function: Plugboard_Reflector::store_config_pr(int)
void Plugboard_Reflector::store_config_pr(int store_code){
  ifstream in_put;
  in_put.open(config_pr->get_file(store_code));      //to get the file name from the Config class
  
  vector<int>* buffer_vec;
  int buffer;

  if(store_code == PB){
    buffer_vec = &swap_config;
  }
  if(store_code == RF){
    buffer_vec = &ref_config;
  }
  while(in_put>>buffer){
    buffer_vec->push_back(buffer);
  }
  in_put.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2150
movq -0x248(%rbp), %rax
movq 0x30(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x5740
movq %rax, -0x240(%rbp)
jmp 0x6905
movq -0x240(%rbp), %rsi
leaq -0x218(%rbp), %rdi
movl $0x8, %edx
callq 0x20e0
jmp 0x691f
cmpl $0x64, -0xc(%rbp)
jne 0x6958
movq -0x248(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x6958
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2060
jmp 0x69f5
cmpl $0xc8, -0xc(%rbp)
jne 0x6973
movq -0x248(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x230(%rbp)
jmp 0x6975
leaq -0x218(%rbp), %rdi
leaq -0x234(%rbp), %rsi
callq 0x20d0
movq %rax, -0x250(%rbp)
jmp 0x6991
movq -0x250(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2170
movb %al, -0x251(%rbp)
jmp 0x69af
movb -0x251(%rbp), %al
testb $0x1, %al
jne 0x69bb
jmp 0x69d2
movq -0x230(%rbp), %rdi
leaq -0x234(%rbp), %rsi
callq 0x58d0
jmp 0x69d0
jmp 0x6975
leaq -0x218(%rbp), %rdi
callq 0x2050
jmp 0x69e0
leaq -0x218(%rbp), %rdi
callq 0x2060
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x220(%rbp), %rdi
callq 0x21f0
nopw %cs:(%rax,%rax)
// File: yuroitaki[P]enigma_machine/plugboard_reflector.cpp
// Function: Plugboard_Reflector::mapping(int&, int)
void Plugboard_Reflector::mapping(int& code, int map_code){
  int len1 = swap_config.size();
  int len2 = ref_config.size();
  
  vector<int>* buffer_config;
  int len = 0;

  if (map_code == PB){
    len = len1;
    buffer_config = &swap_config;
  }
  if (map_code == RF){
    len = len2;
    buffer_config = &ref_config;
  }
  for(int i=0;i<len;i++){
    if (i%2==0){                          //maps the even-numbered letter to the subsequent letter
      if((*buffer_config)[i]==code){
    	code = (*buffer_config)[i+1];
	break;
      }
    }
    if (i%2!=0){                         //maps the odd-numbered letter to the previous letter
      if((*buffer_config)[i]==code){
	code = (*buffer_config)[i-1];
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x5940
movq -0x38(%rbp), %rdi
movl %eax, -0x18(%rbp)
addq $0x18, %rdi
callq 0x5940
movl %eax, -0x1c(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x64, -0x14(%rbp)
jne 0x6a5e
movq -0x38(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, -0x2c(%rbp)
movq %rax, -0x28(%rbp)
cmpl $0xc8, -0x14(%rbp)
jne 0x6a79
movq -0x38(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, -0x2c(%rbp)
addq $0x18, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x6b24
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x6ad1
movq -0x28(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x5960
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x6acf
movq -0x28(%rbp), %rdi
movl -0x30(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x5960
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x6b24
jmp 0x6ad1
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x6b14
movq -0x28(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x5960
movl (%rax), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x6b12
movq -0x28(%rbp), %rdi
movl -0x30(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x5960
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x6b14
jmp 0x6b16
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6a80
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: yuroitaki[P]enigma_machine/rotor.cpp
// Function: Rotor::Rotor(Config*, int)
Rotor::Rotor(Config* config_rotor, int rotor_idt){
  config_rot = config_rotor;
  rotor_id = rotor_idt;
  notch_reached = false;
  store_encrypt(rotor_id);
  create_key();
  shift_ground(SETUP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x8, %rdi
movq %rdi, -0x48(%rbp)
callq 0x58b0
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
movq %rdi, -0x40(%rbp)
callq 0x58b0
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0x38(%rbp)
callq 0x58b0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, (%rdi)
movl -0x14(%rbp), %eax
movl %eax, 0x54(%rdi)
movb $0x0, 0x58(%rdi)
movl 0x54(%rdi), %esi
callq 0x6bf0
jmp 0x6b99
movq -0x30(%rbp), %rdi
callq 0x6ea0
jmp 0x6ba4
movq -0x30(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x6ef0
jmp 0x6bb4
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x30b0
movq -0x40(%rbp), %rdi
callq 0x30b0
movq -0x48(%rbp), %rdi
callq 0x30b0
movq -0x20(%rbp), %rdi
callq 0x21f0
nopw (%rax,%rax)
// File: yuroitaki[P]enigma_machine/rotor.cpp
// Function: Rotor::encrypting(int&, int)
void Rotor::encrypting(int& code, int signal){
  int len = forward_encryption.size();

  if(signal==FORWARD){                        //forward mapping function
    int buffer = forward_encryption[code];
    for (int i=0;i<len;i++){
      if (buffer == backward_encryption[i]){
	code = i;
      }
    }
  }
  if (signal==BACKWARD){                      //backward mapping function
    int buffer = backward_encryption[code];
    for (int i=0;i<len;i++){
      if(buffer == forward_encryption[i]){
	code = i;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x8, %rdi
callq 0x5940
movl %eax, -0x18(%rbp)
cmpl $0x3e8, -0x14(%rbp)     # imm = 0x3E8
jne 0x7201
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rsi
callq 0x5960
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x71ff
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
addq $0x20, %rdi
movslq -0x20(%rbp), %rsi
callq 0x5960
movq %rax, %rcx
movl -0x34(%rbp), %eax
cmpl (%rcx), %eax
jne 0x71f2
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x71f4
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x71c0
jmp 0x7201
cmpl $0x7d0, -0x14(%rbp)     # imm = 0x7D0
jne 0x726b
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rsi
callq 0x5960
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x7269
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
addq $0x8, %rdi
movslq -0x28(%rbp), %rsi
callq 0x5960
movq %rax, %rcx
movl -0x38(%rbp), %eax
cmpl (%rcx), %eax
jne 0x725c
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x725e
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x722a
jmp 0x726b
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: js850[P]lbfgs_cpp/example.cpp
// Function: func2(double*, double*, unsigned long)
double func2(double * x, double * g, size_t N)
{
  size_t i;
  double dot = 0.;
  for (i=0; i<N; ++i) {
    dot += x[i] * x[i];
    g[i] = 2. * x[i];
  }
  return dot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1376
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x28(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsd 0x4cb2(%rip), %xmm0     # 0x6008
mulsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1310
movsd -0x28(%rbp), %xmm0
popq %rbp
retq
nopl (%rax)
// File: js850[P]lbfgs_cpp/lbfgs.cpp
// Function: vecdot(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>)
double vecdot(std::vector<double> const v1, std::vector<double> const v2)
{
  assert(v1.size() == v2.size());
  size_t i;
  double dot = 0.;
  for (i=0; i<v1.size(); ++i) {
    dot += v1[i] * v2[i];
  }
  return dot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x4120
movq -0x30(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0x4120
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jne 0x24a8
jmp 0x24c7
leaq 0x3bf9(%rip), %rdi      # 0x60a8
leaq 0x3c09(%rip), %rsi      # 0x60bf
movl $0x1b, %edx
leaq 0x3c07(%rip), %rcx      # 0x60c9
callq 0x1070
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x4120
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x2540
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4140
movq -0x30(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x18(%rbp), %rsi
callq 0x4140
movsd -0x48(%rbp), %xmm0
movsd (%rax), %xmm2
movsd -0x20(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x24d7
movsd -0x20(%rbp), %xmm0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: js850[P]lbfgs_cpp/lbfgs.cpp
// Function: LBFGS_ns::LBFGS::one_iteration()
void LBFGS::one_iteration()
{
  std::vector<double> x_old = x_;
  std::vector<double> g_old = g_;

  compute_lbfgs_step();

  double stepsize = backtracking_linesearch();

  update_memory(x_old, g_old, x_, g_);
  if ((iprint_ > 0) && (iter_number_ % iprint_ == 0)){
    cout << "lbgs: " << iter_number_ 
      << " f " << f_ 
      << " rms " << rms_
      << " stepsize " << stepsize << "\n";
  }
  iter_number_ += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x58(%rbp)
addq $0x38, %rsi
leaq -0x20(%rbp), %rdi
callq 0x4160
movq -0x58(%rbp), %rsi
addq $0x58, %rsi
leaq -0x38(%rbp), %rdi
callq 0x4160
jmp 0x2d97
movq -0x58(%rbp), %rdi
callq 0x2f40
jmp 0x2da2
movq -0x58(%rbp), %rdi
callq 0x3680
movsd %xmm0, -0x60(%rbp)
jmp 0x2db2
movq -0x58(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movq %rdi, %rcx
addq $0x38, %rcx
movq %rdi, %r8
addq $0x58, %r8
leaq -0x20(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x3ce0
jmp 0x2ddd
movq -0x58(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jle 0x2f05
movq -0x58(%rbp), %rcx
movl 0x30(%rcx), %eax
cltd
idivl 0x2c(%rcx)
cmpl $0x0, %edx
jne 0x2f05
movq 0x71d2(%rip), %rdi      # 0x9fd8
leaq 0x3300(%rip), %rsi      # 0x610d
callq 0x10b0
movq %rax, -0x68(%rbp)
jmp 0x2e18
movq -0x68(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x1130
movq %rax, -0x70(%rbp)
jmp 0x2e2e
movq -0x70(%rbp), %rdi
leaq 0x32db(%rip), %rsi      # 0x6114
callq 0x10b0
movq %rax, -0x78(%rbp)
jmp 0x2e44
movq -0x78(%rbp), %rdi
movq -0x58(%rbp), %rax
movsd 0x50(%rax), %xmm0
callq 0x1160
movq %rax, -0x80(%rbp)
jmp 0x2e5c
movq -0x80(%rbp), %rdi
leaq 0x32b1(%rip), %rsi      # 0x6118
callq 0x10b0
movq %rax, -0x88(%rbp)
jmp 0x2e75
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rax
movsd 0x70(%rax), %xmm0
callq 0x1160
movq %rax, -0x90(%rbp)
jmp 0x2e93
movq -0x90(%rbp), %rdi
leaq 0x327d(%rip), %rsi      # 0x611e
callq 0x10b0
movq %rax, -0x98(%rbp)
jmp 0x2eaf
movq -0x98(%rbp), %rdi
movsd -0x50(%rbp), %xmm0
callq 0x1160
movq %rax, -0xa0(%rbp)
jmp 0x2ec9
movq -0xa0(%rbp), %rdi
leaq 0x326d(%rip), %rsi      # 0x6144
callq 0x10b0
jmp 0x2ede
jmp 0x2f05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2f2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x19e0
jmp 0x2f2d
movq -0x58(%rbp), %rax
movl 0x30(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x30(%rax)
leaq -0x38(%rbp), %rdi
callq 0x19e0
leaq -0x20(%rbp), %rdi
callq 0x19e0
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x19e0
movq -0x40(%rbp), %rdi
callq 0x1140
nop
// File: js850[P]lbfgs_cpp/lbfgs.cpp
// Function: LBFGS_ns::LBFGS::run()
void LBFGS::run()
{
  // iterate until the stop criterion is satisfied or maximum number of
  // iterations is reached
  while (iter_number_ < maxiter_)
  {
    if (stop_criterion_satisfied()){
      break;
    }
    one_iteration();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movl 0x30(%rcx), %eax
cmpl 0x28(%rcx), %eax
jge 0x408c
movq -0x10(%rbp), %rdi
callq 0x40a0
testb $0x1, %al
jne 0x407f
jmp 0x4081
jmp 0x408c
movq -0x10(%rbp), %rdi
callq 0x2d60
jmp 0x4064
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: AndreiBarsan[P]uShell/command.cc
// Function: microshell::core::CdBuiltin::invoke(microshell::core::Shell*)
int CdBuiltin::invoke(Shell *shell) {
  if(argv.size() > 1) {
    string dir = argv[1];
    // TODO(andrei) Centralized code to resolve path.
    // Example: shell->resolve(path)
    // Figures out if path is relative or absolute, resolves ~, .. etc.
    string full_path = util::merge_paths(shell->get_working_directory(), dir);
    if(util::is_directory(full_path)) {
      shell->set_working_directory(full_path);
      return 1;
    }
    else {
      shell->eout("cd: no such directory: " + dir);
      return 0;
    }
  }

  // TODO(andrei) Proper tilde expansion and home folder lookup.
  shell->set_working_directory("~");
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
addq $0x8, %rdi
callq 0x7120
cmpq $0x1, %rax
jbe 0x67f8
movq -0xb8(%rbp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x6b60
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x5120
movq -0x18(%rbp), %rdi
callq 0x1b3d0
movq %rax, -0xc0(%rbp)
jmp 0x66e4
movq -0xc0(%rbp), %rsi
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x20350
jmp 0x66fa
leaq -0x58(%rbp), %rdi
callq 0x208e0
movb %al, -0xc1(%rbp)
jmp 0x670b
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x6717
jmp 0x675b
movq -0x18(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x1b3f0
jmp 0x6726
movl $0x1, -0x4(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x67ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x67ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x67e1
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq 0x1b987(%rip), %rsi     # 0x220f4
leaq -0x88(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x6a50
jmp 0x677f
movq -0xd0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1aa60
jmp 0x6794
leaq -0x88(%rbp), %rdi
callq 0x5190
movl $0x0, -0x4(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x67ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5190
jmp 0x67e1
leaq -0x58(%rbp), %rdi
callq 0x5190
leaq -0x38(%rbp), %rdi
callq 0x5190
jmp 0x689c
leaq -0x58(%rbp), %rdi
callq 0x5190
leaq -0x38(%rbp), %rdi
callq 0x5190
jmp 0x68a8
movq -0x18(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x5470
movq -0xd8(%rbp), %rdx
leaq 0x1b8e8(%rip), %rsi     # 0x2210c
leaq -0xa8(%rbp), %rdi
callq 0x5360
jmp 0x6832
movq -0xe0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3f0
jmp 0x6847
leaq -0xa8(%rbp), %rdi
callq 0x5190
leaq -0xa9(%rbp), %rdi
callq 0x52c0
movl $0x1, -0x4(%rbp)
jmp 0x689c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x688e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5190
leaq -0xa9(%rbp), %rdi
callq 0x52c0
jmp 0x68a8
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x5460
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: AndreiBarsan[P]uShell/./shell.h
// Function: microshell::core::Shell::get()
static Shell* get() {
    if (nullptr == Shell::instance) {
      cerr << "Tried to access shell before initialization." << endl;
      ::exit(-1);
    }

    return Shell::instance;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leaq 0x329eb(%rip), %rcx     # 0x392b8
cmpq (%rcx), %rax
jne 0x68fe
movq 0x32717(%rip), %rdi     # 0x38ff0
leaq 0x1b831(%rip), %rsi     # 0x22111
callq 0x5270
movq %rax, %rdi
movq 0x326c1(%rip), %rsi     # 0x38fb0
callq 0x52b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x5300
leaq 0x329b3(%rip), %rax     # 0x392b8
movq (%rax), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: AndreiBarsan[P]uShell/main.cc
// Function: handler(int)
void handler(int sig) {
  void *array[10];
  size_t size;

  size = backtrace(array, 10);

  fprintf(stderr, "Error: signal %d:\n", sig);
  backtrace_symbols_fd(array, size, STDERR_FILENO);
  exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
movl $0xa, %esi
callq 0x53c0
cltq
movq %rax, -0x68(%rbp)
movq 0x20f7a(%rip), %rax     # 0x38fd0
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0xb089(%rip), %rsi      # 0x230ec
movb $0x0, %al
callq 0x5390
leaq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rax
movl %eax, %esi
movl $0x2, %edx
callq 0x5420
movl $0x1, %edi
callq 0x5300
nopl (%rax,%rax)
// File: AndreiBarsan[P]uShell/main.cc
// Function: main
int main(int argc, char **argv) {
  // Enable stack traces on crashes.
  signal(SIGSEGV, handler);

  microshell::core::Shell *shell = microshell::core::Shell::initialize(util::argv_to_strvec(argc, argv));
  return shell->interactive();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x7d(%rip), %rsi       # 0x18030
movl $0xb, %edi
callq 0x52f0
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x20230
movq -0x50(%rbp), %rdi
callq 0x18120
movq %rax, -0x48(%rbp)
jmp 0x180da
leaq -0x30(%rbp), %rdi
callq 0x8660
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1aab0
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x8660
movq -0x38(%rbp), %rdi
callq 0x5460
nopl (%rax,%rax)
// File: AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::handle_sigint(int)
void handle_sigint(int signo) {
  // TODO(andrei) This will be invalid for a brief moment between when this
  // signal handler is set up and when the shell initialization finishes.
  Shell *shell = Shell::get();

  if(SIGINT != signo) {
    // TODO(andrei) Signal2name.
    shell->fatal("Signal mismatch.  Expecting SIGINT, got " + to_string(signo));
  }

  if(shell->get_waiting_for_child()) {
    shell->info("C-c while child was running.");
  }
  else {
    shell->info("C-c while NO child was running. Terminating shell.");
    // TODO(andrei) Ensure that we synchronize properly.
    shell->exit();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movl %edi, -0x4(%rbp)
callq 0x68c0
movq %rax, -0x10(%rbp)
movl $0x2, %eax
cmpl -0x4(%rbp), %eax
je 0x19d73
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0x4(%rbp), %esi
leaq -0x50(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x6ca0
movq -0xb8(%rbp), %rdx
leaq 0x95b6(%rip), %rsi      # 0x232c7
leaq -0x30(%rbp), %rdi
callq 0x6c50
jmp 0x19d1c
movq -0xc0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x19ee0
jmp 0x19d2e
leaq -0x30(%rbp), %rdi
callq 0x5190
leaq -0x50(%rbp), %rdi
callq 0x5190
jmp 0x19d73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x19d65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5190
leaq -0x50(%rbp), %rdi
callq 0x5190
jmp 0x19ecb
movq -0x10(%rbp), %rdi
callq 0x19f50
testb $0x1, %al
jne 0x19d85
jmp 0x19e1c
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x5470
movq -0xc8(%rbp), %rdx
leaq 0x953f(%rip), %rsi      # 0x232f0
leaq -0x80(%rbp), %rdi
callq 0x5360
jmp 0x19dbc
movq -0xd0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x19f70
jmp 0x19dce
leaq -0x80(%rbp), %rdi
callq 0x5190
leaq -0x81(%rbp), %rdi
callq 0x52c0
jmp 0x19ec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x19e0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x5190
leaq -0x81(%rbp), %rdi
callq 0x52c0
jmp 0x19ecb
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x5470
movq -0xd8(%rbp), %rdx
leaq 0x94c5(%rip), %rsi      # 0x2330d
leaq -0xa8(%rbp), %rdi
callq 0x5360
jmp 0x19e56
movq -0xe0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x19f70
jmp 0x19e6b
leaq -0xa8(%rbp), %rdi
callq 0x5190
leaq -0xa9(%rbp), %rdi
callq 0x52c0
movq -0x10(%rbp), %rdi
callq 0x1a020
jmp 0x19ec2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x19eb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5190
leaq -0xa9(%rbp), %rdi
callq 0x52c0
jmp 0x19ecb
addq $0xe0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x5460
nopw %cs:(%rax,%rax)
// File: AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::exit()
void Shell::exit() {
  if(this->exit_requested) {
    this->fatal("Requested exit twice.");
  }

  // This way, the shell gets a chance to shut down in a clean fashion without
  // having to call `exit()'.
  // TODO(andrei) Test that nothing else is ever run after `exit_requested' is
  // set, no matter where.
  this->exit_requested = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
testb $0x1, (%rax)
je 0x1a0ad
leaq -0x29(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x5470
movq -0x50(%rbp), %rdx
leaq 0x94a2(%rip), %rsi      # 0x234f3
leaq -0x28(%rbp), %rdi
callq 0x5360
jmp 0x1a05c
movq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x19ee0
jmp 0x1a06b
leaq -0x28(%rbp), %rdi
callq 0x5190
leaq -0x29(%rbp), %rdi
callq 0x52c0
jmp 0x1a0ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a0a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5190
leaq -0x29(%rbp), %rdi
callq 0x52c0
jmp 0x1a0ba
movq -0x48(%rbp), %rax
movb $0x1, (%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5460
nopw %cs:(%rax,%rax)
// File: AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::handle_sigtstp(int)
void handle_sigtstp(int signo) {
  Shell *shell = Shell::get();

  if(SIGTSTP != signo) {
    shell->fatal(
      "Signal mismatch.  Expecting SIGTSTP, got " +
      string(strsignal(signo)) +
      "."
    );
  }

  if(shell->get_waiting_for_child()) {
    shell->info("Suspending foreground job.  Use `fg' to continue it in the "
        "foreground, or `bg' to continue it in the background.");
  }

  // Otherwise, we just ignore the signal.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movl %edi, -0x4(%rbp)
callq 0x68c0
movq %rax, -0x10(%rbp)
movl $0x14, %eax
cmpl -0x4(%rbp), %eax
je 0x1a207
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl -0x4(%rbp), %edi
callq 0x5480
movq %rax, -0xc0(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x5470
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x5360
jmp 0x1a138
leaq 0x9201(%rip), %rsi      # 0x23340
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x6c50
jmp 0x1a14e
leaq 0x92e8(%rip), %rdx      # 0x2343d
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x69b0
jmp 0x1a164
movq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x19ee0
jmp 0x1a176
leaq -0x30(%rbp), %rdi
callq 0x5190
leaq -0x50(%rbp), %rdi
callq 0x5190
leaq -0x70(%rbp), %rdi
callq 0x5190
leaq -0x71(%rbp), %rdi
callq 0x52c0
jmp 0x1a207
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1a1f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1a1f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1a1e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5190
leaq -0x50(%rbp), %rdi
callq 0x5190
leaq -0x70(%rbp), %rdi
callq 0x5190
leaq -0x71(%rbp), %rdi
callq 0x52c0
jmp 0x1a2c5
movq -0x10(%rbp), %rdi
callq 0x19f50
testb $0x1, %al
jne 0x1a219
jmp 0x1a2bc
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x5470
movq -0xd0(%rbp), %rdx
leaq 0x9125(%rip), %rsi      # 0x2336a
leaq -0xa8(%rbp), %rdi
callq 0x5360
jmp 0x1a253
movq -0xd8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x19f70
jmp 0x1a268
leaq -0xa8(%rbp), %rdi
callq 0x5190
leaq -0xa9(%rbp), %rdi
callq 0x52c0
jmp 0x1a2bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x1a2ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5190
leaq -0xa9(%rbp), %rdi
callq 0x52c0
jmp 0x1a2c5
addq $0xe0, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x5460
nop
// File: AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::load_default_modules()
int Shell::load_default_modules() {
  this->load_module(
    make_shared<sample_module::SampleModule>(sample_module::SampleModule())
  );
  this->load_module(
    make_shared<job_control::JobControl>(job_control::JobControl())
  );
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x1c820
movq -0x60(%rbp), %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x1c7b0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x1c600
jmp 0x1a9d9
leaq -0x18(%rbp), %rdi
callq 0x1c860
movq $0x0, -0x48(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x1caa0
movq -0x70(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x1ca30
movq -0x58(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x1c880
jmp 0x1aa17
leaq -0x40(%rbp), %rdi
callq 0x1cae0
xorl %eax, %eax
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1c860
jmp 0x1aa54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1cae0
movq -0x28(%rbp), %rdi
callq 0x5460
nopl (%rax)
// File: AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::interactive()
int Shell::interactive() {
  while (!exit_requested) {
    string command_text = read_command();
    if(0 == command_text.length()) {
      cout << endl;
      continue;
    }

    shared_ptr<Command> command;
    string error;
    if(parse_command(command_text, command, &error)) {
      interpret_command(*command);
    }
    else {
      eout(error);
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb (%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1aad8
jmp 0x1abf7
movq -0x70(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x1ac10
leaq -0x28(%rbp), %rdi
callq 0x53d0
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1ab2a
movq 0x1e4c9(%rip), %rdi     # 0x38fc8
movq 0x1e4aa(%rip), %rsi     # 0x38fb0
callq 0x52b0
jmp 0x1ab0d
movl $0x2, -0x38(%rbp)
jmp 0x1abd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1abec
leaq -0x48(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x1c190
leaq -0x68(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x5370
movq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rcx
leaq -0x28(%rbp), %rsi
callq 0x1adf0
movb %al, -0x71(%rbp)
jmp 0x1ab64
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x1ab6d
jmp 0x1aba6
leaq -0x48(%rbp), %rdi
callq 0x1c1b0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x1b270
jmp 0x1ab84
jmp 0x1abb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5190
leaq -0x48(%rbp), %rdi
callq 0x1c1e0
jmp 0x1abec
movq -0x70(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1aa60
jmp 0x1abb5
jmp 0x1abb7
leaq -0x68(%rbp), %rdi
callq 0x5190
leaq -0x48(%rbp), %rdi
callq 0x1c1e0
movl $0x0, -0x38(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5190
movl -0x38(%rbp), %eax
testl %eax, %eax
je 0x1abe7
jmp 0x1abe2
jmp 0x1aac7
jmp 0x1aac7
leaq -0x28(%rbp), %rdi
callq 0x5190
jmp 0x1ac02
xorl %eax, %eax
addq $0x90, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5460
nopl (%rax,%rax)
// File: AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::read_command[abi:cxx11]()
string Shell::read_command() {
  unique_ptr<char> line(readline(get_prompt().c_str()));

  // This happens if e.g. the user enters an EOF character (C-D).
  if(!line) {
    this->exit();
    return "";
  }

  string command(line.get());
  if(command.size() > 0) {
    add_history(line.get());
  }
  return command;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x68(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x1b610
movq -0x60(%rbp), %rdi
callq 0x5110
movq %rax, %rdi
callq 0x5240
movq %rax, -0x58(%rbp)
jmp 0x1ac5a
movq -0x58(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x1c280
leaq -0x38(%rbp), %rdi
callq 0x5190
leaq -0x18(%rbp), %rdi
callq 0x1c2b0
testb $0x1, %al
jne 0x1ad09
movq -0x68(%rbp), %rdi
callq 0x1a020
jmp 0x1ac8c
leaq -0x45(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x5470
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0x8456(%rip), %rsi      # 0x230fe
callq 0x5360
jmp 0x1acaf
leaq -0x45(%rbp), %rdi
callq 0x52c0
movl $0x1, -0x4c(%rbp)
jmp 0x1adbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5190
jmp 0x1addc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1add3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x45(%rbp), %rdi
callq 0x52c0
jmp 0x1add3
movb $0x0, -0x4d(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1c2e0
movq %rax, -0x90(%rbp)
leaq -0x4e(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x5470
movq -0x78(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x5360
jmp 0x1ad46
leaq -0x4e(%rbp), %rdi
callq 0x52c0
movq -0x78(%rbp), %rdi
callq 0x51c0
cmpq $0x0, %rax
jbe 0x1ada1
leaq -0x18(%rbp), %rdi
callq 0x1c2e0
movq %rax, %rdi
callq 0x5340
jmp 0x1ad71
jmp 0x1ada1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x4e(%rbp), %rdi
callq 0x52c0
jmp 0x1add3
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x5190
jmp 0x1add3
movb $0x1, -0x4d(%rbp)
movl $0x1, -0x4c(%rbp)
testb $0x1, -0x4d(%rbp)
jne 0x1adbb
movq -0x78(%rbp), %rdi
callq 0x5190
jmp 0x1adbd
leaq -0x18(%rbp), %rdi
callq 0x1c310
movq -0x70(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0x1c310
movq -0x40(%rbp), %rdi
callq 0x5460
nopw %cs:(%rax,%rax)
// File: AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::expand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
string Shell::expand(const string& param) const {
  // TODO(andrei) Variable expansions happen first.

  if(0 == param.find("~")) {
    string rest = param.substr(1);
    return util::merge_paths(home_directory, rest);
  }

  return param;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x6e3a(%rip), %rsi      # 0x2210c
xorl %eax, %eax
movl %eax, %edx
callq 0x54d0
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1b33b
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movl $0x1, %edx
movq $-0x1, %rcx
callq 0x5290
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rdx
addq $0x60, %rsi
callq 0x20350
jmp 0x1b319
leaq -0x38(%rbp), %rdi
callq 0x5190
jmp 0x1b348
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5190
jmp 0x1b352
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5120
movq -0x58(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x5460
nopl (%rax,%rax)
// File: AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::resolve_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
string Shell::resolve_path(const string& path) const {
  if(util::is_absolute_path(path)) {
    return path;
  }

  // The VFS can handle the `..' sequences, but we want to handle them
  // ourselves in order to display the path in a clearer way.

  return util::merge_paths(working_directory, path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x30(%rbp)
movq %rdi, %rax
movq %rax, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x202d0
testb $0x1, %al
jne 0x1b396
jmp 0x1b3a5
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5120
jmp 0x1b3ba
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x40, %rsi
movq -0x18(%rbp), %rdx
callq 0x20350
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)