LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: hyp1231[P]FMSS/disk.cpp
// Function: Disk::Putblk(char*, int)
bool Disk::Putblk(char buf[], int blk_num) {
	ofstream ofile(disk_file, ios::out | ios::in);
	if(!ofile) {	// cannot open file
		cout << "Diskfile not found... (´Д` )" << endl;
		return false;
	}
	ofile.seekp(ofile.beg + BLKsize * blk_num);
	for(int i = 0; i < BLKsize; ++i) {
		ofile.write((char*)&buf[i], sizeof(char));
	}
	ofile.close();
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x250(%rbp)
movl $0x10, %edi
movl $0x8, %esi
callq 0x3d40
movq -0x250(%rbp), %rsi
movl %eax, %edx
leaq -0x220(%rbp), %rdi
callq 0x34c0
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x3120
movb %al, -0x245(%rbp)
jmp 0x3b05
movb -0x245(%rbp), %al
testb $0x1, %al
jne 0x3b11
jmp 0x3b78
movq 0x114b8(%rip), %rdi     # 0x14fd0
leaq 0xb517(%rip), %rsi      # 0xf036
callq 0x3250
movq %rax, -0x258(%rbp)
jmp 0x3b2d
movq -0x258(%rbp), %rdi
movq 0x11485(%rip), %rsi     # 0x14fc0
callq 0x32a0
jmp 0x3b42
movb $0x0, -0x1(%rbp)
movl $0x1, -0x230(%rbp)
jmp 0x3c21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x3410
jmp 0x3c3b
movq -0x250(%rbp), %rax
movl 0x20(%rax), %eax
movl -0x1c(%rbp), %ecx
imull %ecx, %eax
movslq %eax, %rsi
leaq -0x240(%rbp), %rdi
callq 0x3d00
jmp 0x3b99
movq -0x240(%rbp), %rsi
movq -0x238(%rbp), %rdx
leaq -0x220(%rbp), %rdi
callq 0x3320
jmp 0x3bb5
movl $0x0, -0x244(%rbp)
movq -0x250(%rbp), %rcx
movl -0x244(%rbp), %eax
cmpl 0x20(%rcx), %eax
jge 0x3c05
movq -0x18(%rbp), %rsi
movslq -0x244(%rbp), %rax
addq %rax, %rsi
leaq -0x220(%rbp), %rdi
movl $0x1, %edx
callq 0x33d0
jmp 0x3bf2
jmp 0x3bf4
movl -0x244(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x244(%rbp)
jmp 0x3bbf
leaq -0x220(%rbp), %rdi
callq 0x33f0
jmp 0x3c13
movb $0x1, -0x1(%rbp)
movl $0x1, -0x230(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x3410
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x228(%rbp), %rdi
callq 0x3490
nopw (%rax,%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: byteEQUstring(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char*, int, int)
bool byteEQUstring(const string& str, char buf[], int begin, int end) {
    if (str.length() != end - begin)
        return false;
    for (int i = 0; i < str.length(); i++) {
        if (str[i] != buf[begin + i])
            return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3420
movl -0x20(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
je 0x4033
movb $0x0, -0x1(%rbp)
jmp 0x4093
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3420
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x408f
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x32f0
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
addl -0x24(%rbp), %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4082
movb $0x0, -0x1(%rbp)
jmp 0x4093
jmp 0x4084
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x403a
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: byte2int(char*, int, int)
int byte2int(char buf[], int begin, int end) {
    if (end - begin > 4) {
        cout << "[Error] Too many bytes to convert them to int!" << endl;
        return -1;
    }

    int ret = 0;
    for (int i = 0; i < end - begin; i++) {
        ret += (int)buf[begin + i] << (i * 8);   // little endian
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x4, %eax
jle 0x4128
movq 0x10ecc(%rip), %rdi     # 0x14fd0
leaq 0xaf74(%rip), %rsi      # 0xf07f
callq 0x3250
movq %rax, %rdi
movq 0x10ea6(%rip), %rsi     # 0x14fc0
callq 0x32a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4173
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x18(%rbp), %ecx
subl -0x14(%rbp), %ecx
cmpl %ecx, %eax
jge 0x416d
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl -0x20(%rbp), %ecx
shll $0x3, %ecx
shll %cl, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4136
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: byte2string[abi:cxx11](char*, int, int)
string byte2string(char buf[], int begin, int end) {
    string ret = "";
    for (int i = begin; i < end; i++) {
        int tmp = byte2int(buf, i, i + 1);
        if (tmp == 0)
            break;
        ret += buf[i];
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
leaq -0x1a(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x34a0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0xb3eb(%rip), %rsi      # 0xf5ac
callq 0x3c50
jmp 0x41c8
leaq -0x1a(%rbp), %rdi
callq 0x32d0
movl -0x14(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x4254
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %esi
movl %esi, %edx
incl %edx
callq 0x40e0
movl %eax, -0x54(%rbp)
jmp 0x41f4
movl -0x54(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x4230
jmp 0x4254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1a(%rbp), %rdi
callq 0x32d0
jmp 0x4271
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x3160
jmp 0x4271
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %esi
callq 0x3170
jmp 0x4247
jmp 0x4249
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x41d7
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x4267
movq -0x48(%rbp), %rdi
callq 0x3160
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x3490
nopw (%rax,%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: Decomposition_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
bool Decomposition_path(string ori_path, vector<string>& path) {
    if(ori_path.empty()) { return false; }

    // if start of root
    if(ori_path[0] == '/') {
        path.push_back("/");
        ori_path = ori_path.substr(1);
    }

    // rest
    int p;
    while((p = (int)ori_path.find('/')) != -1) {
        // start of '/', illegal
        if(p < 1) { return false; }

        path.push_back(ori_path.substr(0, p));

        ori_path = ori_path.substr(p + 1);
    }

    // the last one
    if(!ori_path.empty()) { 
        path.push_back(ori_path);
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xc0(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x3470
testb $0x1, %al
jne 0x42a5
jmp 0x42ae
movb $0x0, -0x1(%rbp)
jmp 0x448f
movq -0xc0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3500
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x438a
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x34a0
movq -0xc8(%rbp), %rdx
leaq 0xadbb(%rip), %rsi      # 0xf0ae
leaq -0x38(%rbp), %rdi
callq 0x3c50
jmp 0x42fe
movq -0xd0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x91a0
jmp 0x4310
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x39(%rbp), %rdi
callq 0x32d0
movq -0xc0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0x3280
movq -0xc0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3330
leaq -0x70(%rbp), %rdi
callq 0x3160
jmp 0x438a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x437c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3160
leaq -0x39(%rbp), %rdi
callq 0x32d0
jmp 0x449d
jmp 0x438c
movq -0xc0(%rbp), %rdi
movl $0x2f, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33b0
movl %eax, -0x74(%rbp)
cmpl $-0x1, %eax
je 0x446b
cmpl $0x1, -0x74(%rbp)
jge 0x43bc
movb $0x0, -0x1(%rbp)
jmp 0x448f
movq -0xc0(%rbp), %rsi
movq -0x18(%rbp), %rax
movq %rax, -0xe0(%rbp)
movslq -0x74(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x98(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3280
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x91a0
jmp 0x43fe
leaq -0x98(%rbp), %rdi
callq 0x3160
movq -0xc0(%rbp), %rsi
movl -0x74(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
leaq -0xb8(%rbp), %rdi
movq $-0x1, %rcx
callq 0x3280
movq -0xc0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3330
leaq -0xb8(%rbp), %rdi
callq 0x3160
jmp 0x438c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x3160
jmp 0x449d
movq -0xc0(%rbp), %rdi
callq 0x3470
testb $0x1, %al
jne 0x448b
movq -0xc0(%rbp), %rsi
movq -0x18(%rbp), %rdi
callq 0x91d0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xe0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3490
nopw %cs:(%rax,%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: getTime[abi:cxx11]()
string getTime() {
    time_t timep;
    time (&timep);
    char tmp[64];
    strftime(tmp, sizeof(tmp), "%Y-%m-%d %H:%M",localtime(&timep) );
    return tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x3240
movq -0x88(%rbp), %rdi
callq 0x31c0
movq %rax, %rcx
leaq 0xaadd(%rip), %rdx      # 0xf0b0
leaq -0x50(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movl $0x40, %esi
callq 0x3200
leaq -0x51(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x34a0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x3c50
jmp 0x4605
leaq -0x51(%rbp), %rdi
callq 0x32d0
movq -0x90(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x32d0
movq -0x60(%rbp), %rdi
callq 0x3490
nopl (%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Get_dir_inodeNum_from_path(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
int FileSystem::Get_dir_inodeNum_from_path(vector<string>& path) {
    int p = 0, inode_num;

    if(path.empty()) {
    	cout << "[Error] empty path!" << endl;
        return -1;
    }

    // initialization
    if(path[0] == "/") {
        ++p;
        inode_num = root_dir_inodeNum;
    } else {
        inode_num = cur_dir_inodeNum;
    }

    while(p < (int)path.size()) {
    	inode_num = Get_file_inodeNum_from_dir(inode_num, path[p]);

    	// if not found
    	if(inode_num == -1) {
    		cout << "[Error] Cannot find file: " << path[p] << endl;
    		return -1;
    	}
    	++p;
    }

    return inode_num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
testb $0x1, %al
jne 0x4c0e
jmp 0x4c3c
movq 0x103bb(%rip), %rdi     # 0x14fd0
leaq 0xa7f9(%rip), %rsi      # 0xf415
callq 0x3250
movq %rax, %rdi
movq 0x10395(%rip), %rsi     # 0x14fc0
callq 0x32a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4d25
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9350
movq %rax, %rdi
leaq 0xa45b(%rip), %rsi      # 0xf0ae
callq 0x9320
testb $0x1, %al
jne 0x4c5e
jmp 0x4c73
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x1c(%rbp)
movl 0x30(%rax), %eax
movl %eax, -0x20(%rbp)
jmp 0x4c7d
movq -0x28(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x20(%rbp)
jmp 0x4c7f
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9370
movq %rax, %rcx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jge 0x4d1f
movl -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9350
movq -0x28(%rbp), %rdi
movl -0x30(%rbp), %esi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x4d30
movl %eax, -0x20(%rbp)
cmpl $-0x1, -0x20(%rbp)
jne 0x4d11
movq 0x10300(%rip), %rdi     # 0x14fd0
leaq 0xa752(%rip), %rsi      # 0xf429
callq 0x3250
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9350
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x3230
movq %rax, %rdi
movq 0x102bd(%rip), %rsi     # 0x14fc0
callq 0x32a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4d25
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4c7f
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Get_inode_from_inodeNum(char*, int)
bool FileSystem::Get_inode_from_inodeNum(char buf[], int inodeNum) {
	char BLKbuf[BLKsize];

	// get inode table
	D.Getblk(BLKbuf, Get_actual_inodeBLKnumber(inodeNum));

	// get inode
	for(int i = 0; i < 64; ++i) {
		buf[i] = BLKbuf[i + (inodeNum % 16) * 64];
	}

	return true;
}

// 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
movl (%rdi), %eax
movq %rsp, %rcx
movq %rcx, -0x20(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, %rsp
movq %rax, -0x28(%rbp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %esi
callq 0x93b0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl %eax, %edx
callq 0x3900
movl $0x0, -0x2c(%rbp)
cmpl $0x40, -0x2c(%rbp)
jge 0x508e
movl -0x2c(%rbp), %ecx
movl -0x14(%rbp), %eax
movl $0x10, %esi
cltd
idivl %esi
movq -0x38(%rbp), %rax
shll $0x6, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5055
movq -0x20(%rbp), %rax
movq %rax, %rsp
movb $0x1, %al
andb $0x1, %al
movq %rbp, %rsp
popq %rbp
retq
nop
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Find_empty_inodeNum()
int FileSystem::Find_empty_inodeNum() {
	for(int i = 0; i < 10; ++i) {
		// find a byte
		if((int)inode_bitmap[i] != -1) {
			// m -> mask
			for(int j = 0, m = 1; j < 8; ++j, m <<= 1) {
				// find a bit
				if((inode_bitmap[i] & m) == 0) {
					return i * 8 + j;
				}
			}
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0xa, -0x14(%rbp)
jge 0x512a
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl 0x50(%rax,%rcx), %eax
cmpl $-0x1, %eax
je 0x511d
movl $0x0, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
cmpl $0x8, -0x18(%rbp)
jge 0x511b
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl 0x50(%rax,%rcx), %eax
andl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jne 0x5106
movl -0x14(%rbp), %eax
shll $0x3, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5131
jmp 0x5108
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0x50dd
jmp 0x511d
jmp 0x511f
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x50b7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Find_empty_dataBLKNum()
int FileSystem::Find_empty_dataBLKNum() {
	for(int i = 0; i < 80; ++i) {
		// find a byte
		if((int)data_block_bitmap[i] != -1) {
			// m -> mask
			for(int j = 0, m = 1; j < 8; ++j, m <<= 1) {
				// find a bit
				if((data_block_bitmap[i] & m) == 0) {
					return i * 8 + j;
				}
			}
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x50, -0x14(%rbp)
jge 0x51ca
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl 0x5a(%rax,%rcx), %eax
cmpl $-0x1, %eax
je 0x51bd
movl $0x0, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
cmpl $0x8, -0x18(%rbp)
jge 0x51bb
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl 0x5a(%rax,%rcx), %eax
andl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jne 0x51a6
movl -0x14(%rbp), %eax
shll $0x3, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x51d1
jmp 0x51a8
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0x517d
jmp 0x51bd
jmp 0x51bf
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5157
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Fill_inode_bitmap(int, bool)
void FileSystem::Fill_inode_bitmap(int inodeNum, bool flag) {
	if(flag) {
		inode_bitmap[inodeNum / 10] |= (1 << (inodeNum % 10));
	} else {
		inode_bitmap[inodeNum / 10] &= ~(1 << (inodeNum % 10));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, -0xd(%rbp)
je 0x5235
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
movsbl 0x50(%rax,%rcx), %edx
orl %esi, %edx
movb %dl, 0x50(%rax,%rcx)
jmp 0x526b
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
xorl $-0x1, %esi
movl -0xc(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
movsbl 0x50(%rax,%rcx), %edx
andl %esi, %edx
movb %dl, 0x50(%rax,%rcx)
popq %rbp
retq
nopl (%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Fill_data_block_bitmap(int, bool)
void FileSystem::Fill_data_block_bitmap(int blockNum, bool flag) {
	if(flag) {
		data_block_bitmap[blockNum / 80] |= (1 << (blockNum % 80));
	} else {
		data_block_bitmap[blockNum / 80] &= ~(1 << (blockNum % 80));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, -0xd(%rbp)
je 0x52c5
movl -0xc(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
movl -0xc(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
movsbl 0x5a(%rax,%rcx), %edx
orl %esi, %edx
movb %dl, 0x5a(%rax,%rcx)
jmp 0x52fb
movl -0xc(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
xorl $-0x1, %esi
movl -0xc(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
movsbl 0x5a(%rax,%rcx), %edx
andl %esi, %edx
movb %dl, 0x5a(%rax,%rcx)
popq %rbp
retq
nopl (%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Save_superBLK()
void FileSystem::Save_superBLK() {
	char buf[BLKsize];
	D.Getblk(buf, 0);

	// save inode bitmap
    for(int i = 3; i <= 12; ++i) {
        buf[i] = inode_bitmap[i - 3];
    }

    // save data block bitmap
    for(int i = 13; i <= 92; ++i) {
        buf[i] = data_block_bitmap[i - 13];
    }

    D.Putblk(buf, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl (%rdi), %eax
movq %rsp, %rcx
movq %rcx, -0x10(%rbp)
movq %rax, %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rsi
subq %rcx, %rsi
movq %rsi, -0x28(%rbp)
movq %rsi, %rsp
movq %rax, -0x18(%rbp)
addq $0x8, %rdi
xorl %edx, %edx
callq 0x3900
movl $0x3, -0x1c(%rbp)
cmpl $0xc, -0x1c(%rbp)
jg 0x5378
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %edx
subl $0x3, %edx
movslq %edx, %rdx
movb 0x50(%rcx,%rdx), %dl
movslq -0x1c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x534b
movl $0xd, -0x20(%rbp)
cmpl $0x5c, -0x20(%rbp)
jg 0x53ac
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl -0x20(%rbp), %edx
subl $0xd, %edx
movslq %edx, %rdx
movb 0x5a(%rcx,%rdx), %dl
movslq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x537f
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
xorl %edx, %edx
callq 0x3aa0
movq -0x10(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::FindEOF(char*)
int FileSystem::FindEOF(char buf[]) {
    for (int i = 0; i < BLKsize - 1; i++) {
        int num = byte2int(buf, i, i + 2);
        if (num == -1)
            return i;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
movl (%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x542f
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %edx
addl $0x2, %edx
callq 0x40e0
movl %eax, -0x20(%rbp)
cmpl $-0x1, -0x20(%rbp)
jne 0x5422
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5436
jmp 0x5424
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x53ef
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Outside_file2str(std::basic_ifstream<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool FileSystem::Outside_file2str(ifstream& ifile, string& str) {
	string tmp;
	str.clear();	// start from empty
	while(getline(ifile, tmp)) {
		str += tmp + '\n';
		if((int)str.length() > 8 * BLKsize) {
			cout << "[Error] File is too large" << endl;
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x33e0
movq -0x20(%rbp), %rdi
callq 0x33c0
movq -0x18(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3070
movq %rax, -0x88(%rbp)
jmp 0x6ee7
movq -0x88(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3350
movb %al, -0x89(%rbp)
jmp 0x6f05
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x6f14
jmp 0x6fbe
leaq -0x70(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0xa, %edx
callq 0x9530
jmp 0x6f28
movq -0x20(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3390
jmp 0x6f37
leaq -0x70(%rbp), %rdi
callq 0x3160
movq -0x20(%rbp), %rdi
callq 0x3420
movq -0x80(%rbp), %rcx
movl (%rcx), %ecx
shll $0x3, %ecx
cmpl %ecx, %eax
jle 0x6fb9
movq 0xe073(%rip), %rdi      # 0x14fd0
leaq 0x8678(%rip), %rsi      # 0xf5dc
callq 0x3250
movq %rax, -0x98(%rbp)
jmp 0x6f72
movq -0x98(%rbp), %rdi
movq 0xe040(%rip), %rsi      # 0x14fc0
callq 0x32a0
jmp 0x6f87
movb $0x0, -0x1(%rbp)
movl $0x1, -0x74(%rbp)
jmp 0x6fc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3160
jmp 0x6fe0
jmp 0x6ed1
movb $0x1, -0x1(%rbp)
movl $0x1, -0x74(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3160
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x3160
movq -0x48(%rbp), %rdi
callq 0x3490
nopw %cs:(%rax,%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::PutInode(char*, int)
void FileSystem::PutInode(char buf[], int inodeNum) {
	char large_buf[BLKsize];
	D.Getblk(large_buf, Get_actual_inodeBLKnumber(inodeNum));
	int st = 64 * (inodeNum % 16);
	for(int i = 0; i < 64; ++i) {
		large_buf[i + st] = buf[i];
	}
	D.Putblk(large_buf, Get_actual_inodeBLKnumber(inodeNum));
}

// 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, -0x48(%rbp)
movl (%rdi), %eax
movq %rsp, %rcx
movq %rcx, -0x20(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, %rsp
movq %rax, -0x28(%rbp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %esi
callq 0x93b0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl %eax, %edx
callq 0x3900
movl -0x14(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
shll $0x6, %edx
movl %edx, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x40, -0x30(%rbp)
jge 0x7bc6
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x30(%rbp), %rdx
movb (%rcx,%rdx), %dl
movl -0x30(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x7b9a
movq -0x48(%rbp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
movl -0x14(%rbp), %esi
callq 0x93b0
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl %eax, %edx
callq 0x3aa0
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::PrintFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool FileSystem::PrintFile(const string& filepath) {
    string filename;
    int dir_inodeNum = Analysis_path(filepath, filename);
    if(dir_inodeNum == -1) {
        return false;
    }
    int file_inodeNum = Get_file_inodeNum_from_dir(dir_inodeNum, filename);
    if(file_inodeNum == -1) {
        cout << "[Error] Cannot find file: " << filename << endl;
        return false;
    }
    if(isDir(file_inodeNum)) {
        cout << "[Error] Target cannot be a directory" << endl;
        return false;
    }
	string file_data;
	Inside_file2str(filepath, file_data);
	cout << file_data;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x33e0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rdx
movq -0x18(%rbp), %rsi
callq 0x65b0
movl %eax, -0x7c(%rbp)
jmp 0x8e0a
movl -0x7c(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $-0x1, -0x3c(%rbp)
jne 0x8e37
movb $0x0, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x8f86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8f9d
movq -0x90(%rbp), %rdi
movl -0x3c(%rbp), %esi
leaq -0x38(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4d30
movl %eax, -0x94(%rbp)
jmp 0x8e54
movl -0x94(%rbp), %eax
movl %eax, -0x54(%rbp)
cmpl $-0x1, -0x54(%rbp)
jne 0x8ebd
movq 0xc166(%rip), %rdi      # 0x14fd0
leaq 0x65b8(%rip), %rsi      # 0xf429
callq 0x3250
movq %rax, -0xa0(%rbp)
jmp 0x8e7f
movq -0xa0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3230
movq %rax, -0xa8(%rbp)
jmp 0x8e98
movq -0xa8(%rbp), %rdi
movq 0xc11a(%rip), %rsi      # 0x14fc0
callq 0x32a0
jmp 0x8ead
movb $0x0, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x8f86
movq -0x90(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x6800
movb %al, -0xa9(%rbp)
jmp 0x8ed4
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x8ee0
jmp 0x8f1e
movq 0xc0e9(%rip), %rdi      # 0x14fd0
leaq 0x681a(%rip), %rsi      # 0xf708
callq 0x3250
movq %rax, -0xb8(%rbp)
jmp 0x8efc
movq -0xb8(%rbp), %rdi
movq 0xc0b6(%rip), %rsi      # 0x14fc0
callq 0x32a0
jmp 0x8f11
movb $0x0, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x8f86
leaq -0x78(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x33e0
movq -0x90(%rbp), %rdi
movq -0xc0(%rbp), %rdx
movq -0x18(%rbp), %rsi
callq 0x8880
jmp 0x8f47
movq 0xc082(%rip), %rdi      # 0x14fd0
leaq -0x78(%rbp), %rsi
callq 0x3230
jmp 0x8f59
movb $0x1, -0x1(%rbp)
movl $0x1, -0x50(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3160
jmp 0x8f86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3160
jmp 0x8f9d
leaq -0x38(%rbp), %rdi
callq 0x3160
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x3160
movq -0x48(%rbp), %rdi
callq 0x3490
nop
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::WriteFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool FileSystem::WriteFile(string& str, const string& filepath) {
    string filename;
    int dir_inodeNum = Analysis_path(filepath, filename);
    if(dir_inodeNum == -1) {
        return false;
    }
    int file_inodeNum = Get_file_inodeNum_from_dir(dir_inodeNum, filename);
    if(file_inodeNum == -1) {
        CreateFile(filepath);
    }
    if(isDir(file_inodeNum)) {
        cout << "[Error] Target cannot be a directory" << endl;
        return false;
    }

    str2Inside_file(str, filepath);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x33e0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
movq -0x20(%rbp), %rsi
callq 0x65b0
movl %eax, -0x60(%rbp)
jmp 0x8ff2
movl -0x60(%rbp), %eax
movl %eax, -0x44(%rbp)
cmpl $-0x1, -0x44(%rbp)
jne 0x9028
movb $0x0, -0x1(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x90cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3160
jmp 0x90e3
movq -0x70(%rbp), %rdi
movl -0x44(%rbp), %esi
leaq -0x40(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4d30
movl %eax, -0x74(%rbp)
jmp 0x903f
movl -0x74(%rbp), %eax
movl %eax, -0x5c(%rbp)
cmpl $-0x1, -0x5c(%rbp)
jne 0x905c
movq -0x70(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5bf0
jmp 0x905a
jmp 0x905c
movq -0x70(%rbp), %rdi
movl -0x5c(%rbp), %esi
callq 0x6800
movb %al, -0x75(%rbp)
jmp 0x906d
movb -0x75(%rbp), %al
testb $0x1, %al
jne 0x9076
jmp 0x90ae
movq 0xbf53(%rip), %rdi      # 0x14fd0
leaq 0x6684(%rip), %rsi      # 0xf708
callq 0x3250
movq %rax, -0x80(%rbp)
jmp 0x908f
movq -0x80(%rbp), %rdi
movq 0xbf26(%rip), %rsi      # 0x14fc0
callq 0x32a0
jmp 0x90a1
movb $0x0, -0x1(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x90cc
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x7c00
jmp 0x90c1
movb $0x1, -0x1(%rbp)
movl $0x1, -0x58(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3160
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3490
nopl (%rax)
// File: hyp1231[P]FMSS/filesystem.cpp
// Function: FileSystem::Print_cur_path()
void FileSystem::Print_cur_path() {
    for(int i = 0; i < (int)cur_path.size(); ++i) {
        cout << cur_path[i];
        if(i != 0 && i != (int)cur_path.size() - 1) {
            cout << "/";
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
addq $0x38, %rdi
callq 0x9370
movq %rax, %rcx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jge 0x9191
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movslq -0xc(%rbp), %rsi
callq 0x9350
movq %rax, %rsi
movq 0xbe8d(%rip), %rdi      # 0x14fd0
callq 0x3230
cmpl $0x0, -0xc(%rbp)
je 0x9181
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
addq $0x38, %rdi
callq 0x9370
movq %rax, %rcx
movl -0x20(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x9181
movq 0xbe5b(%rip), %rdi      # 0x14fd0
leaq 0x5f32(%rip), %rsi      # 0xf0ae
callq 0x3250
jmp 0x9183
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x910b
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: hyp1231[P]FMSS/main.cpp
// Function: Replace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string Replace(string str) {
	string ans;
	int p;
	while((p = str.find("\\n")) != -1) {
		ans += str.substr(0, p);
		ans += '\n';
		str = str.substr(p + 2);
	}
	if(!str.empty()) {
		ans += str;
	}
	return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rsi, -0x80(%rbp)
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x33e0
movq -0x80(%rbp), %rdi
leaq 0x4072(%rip), %rsi      # 0xf778
xorl %eax, %eax
movl %eax, %edx
callq 0x34f0
movl %eax, -0x18(%rbp)
cmpl $-0x1, %eax
je 0xb7b9
movq -0x80(%rbp), %rsi
movslq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x38(%rbp), %rdi
callq 0x3280
jmp 0xb732
movq -0x78(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3390
jmp 0xb741
leaq -0x38(%rbp), %rdi
callq 0x3160
movq -0x78(%rbp), %rdi
movl $0xa, %esi
callq 0x3170
jmp 0xb75a
movq -0x80(%rbp), %rsi
movl -0x18(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rdx
leaq -0x68(%rbp), %rdi
movq $-0x1, %rcx
callq 0x3280
jmp 0xb779
movq -0x80(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3330
leaq -0x68(%rbp), %rdi
callq 0x3160
jmp 0xb6fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb7f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3160
jmp 0xb7f7
movq -0x80(%rbp), %rdi
callq 0x3470
testb $0x1, %al
jne 0xb7d7
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdi
callq 0x3390
jmp 0xb7d5
jmp 0xb7d7
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xb7ea
movq -0x78(%rbp), %rdi
callq 0x3160
movq -0x70(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x3160
movq -0x40(%rbp), %rdi
callq 0x3490
nopl (%rax)
// File: hyp1231[P]FMSS/main.cpp
// Function: Menu()
void Menu() {				// get opts and execute them
	FileSystem S;
	vector<string> opt;
	do {
		cout << "[";
		S.Print_cur_path();
		cout << "]>>> ";
		opt.clear();
		get_opt(opt);
	} while(exec_opt(S, opt));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
leaq -0xb0(%rbp), %rdi
callq 0x46a0
leaq -0xc8(%rbp), %rdi
callq 0x9260
movq 0x8d76(%rip), %rdi      # 0x14fd0
leaq 0x35aa(%rip), %rsi      # 0xf80b
callq 0x3250
jmp 0xc268
leaq -0xb0(%rbp), %rdi
callq 0x90f0
jmp 0xc276
movq 0x8d53(%rip), %rdi      # 0x14fd0
leaq 0x3589(%rip), %rsi      # 0xf80d
callq 0x3250
jmp 0xc28b
leaq -0xc8(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0xcb90
movq -0xe0(%rbp), %rdi
callq 0xb810
jmp 0xc2ac
jmp 0xc2ae
leaq -0xb0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xbbc0
movb %al, -0xe1(%rbp)
jmp 0xc2c9
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0xc253
jmp 0xc2d5
leaq -0xc8(%rbp), %rdi
callq 0x9280
leaq -0xb0(%rbp), %rdi
callq 0x4910
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x9280
leaq -0xb0(%rbp), %rdi
callq 0x4910
movq -0xd0(%rbp), %rdi
callq 0x3490
nopl (%rax)
// File: MyHush[P]hush-seeder/bitcoin.cpp
// Function: CNode::CNode(CService const&, std::vector<CAddress, std::allocator<CAddress>>*)
CNode(const CService& ip, vector<CAddress>* vAddrIn) : you(ip), nHeaderStart(-1), nMessageStart(-1), vAddr(vAddrIn), ban(0), doneAfter(0), nVersion(0) {
    vSend.SetType(SER_NETWORK);
    vSend.SetVersion(0);
    vRecv.SetType(SER_NETWORK);
    vRecv.SetVersion(0);
    if (time(NULL) > 1329696000) {
      vSend.SetVersion(INIT_PROTO_VERSION);
      vRecv.SetVersion(INIT_PROTO_VERSION);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
addq $0x8, %rdi
movq %rdi, -0x60(%rbp)
movl $0x1, %esi
movl %esi, -0x50(%rbp)
movl $0x29817, %edx          # imm = 0x29817
movl %edx, -0x4c(%rbp)
callq 0x8a60
movq -0x58(%rbp), %rdi
movl -0x50(%rbp), %esi
movl -0x4c(%rbp), %edx
addq $0x30, %rdi
movq %rdi, -0x48(%rbp)
callq 0x8a60
jmp 0x8525
movq -0x58(%rbp), %rdi
movl $0xffffffff, 0x58(%rdi) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x5c(%rdi) # imm = 0xFFFFFFFF
movl $0x0, 0x60(%rdi)
addq $0x68, %rdi
movq %rdi, -0x68(%rbp)
callq 0x46b0
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, 0x90(%rdi)
movl $0x0, 0x98(%rdi)
movq $0x0, 0xa0(%rdi)
addq $0xa8, %rdi
movq -0x10(%rbp), %rax
movw 0x10(%rax), %cx
movw %cx, -0x30(%rbp)
movups (%rax), %xmm0
movaps %xmm0, -0x40(%rbp)
movw -0x30(%rbp), %cx
movq %rsp, %rax
movw %cx, 0x10(%rax)
movaps -0x40(%rbp), %xmm0
movups %xmm0, (%rax)
movl $0x1, %esi
callq 0x1a2d0
jmp 0x85a7
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x8ac0
jmp 0x85bb
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0x8ae0
jmp 0x85cc
movq -0x58(%rbp), %rdi
addq $0x30, %rdi
movl $0x1, %esi
callq 0x8ac0
jmp 0x85e0
movq -0x58(%rbp), %rdi
addq $0x30, %rdi
xorl %esi, %esi
callq 0x8ae0
jmp 0x85f1
xorl %eax, %eax
movl %eax, %edi
callq 0x44a0
cmpq $0x4f418d00, %rax       # imm = 0x4F418D00
jle 0x865a
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
movl $0xd1, %esi
callq 0x8ae0
jmp 0x8616
movq -0x58(%rbp), %rdi
addq $0x30, %rdi
movl $0xd1, %esi
callq 0x8ae0
jmp 0x862a
jmp 0x865a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x8663
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x42f0
movq -0x48(%rbp), %rdi
callq 0x8b00
jmp 0x8663
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x8b00
movq -0x20(%rbp), %rdi
callq 0x47f0
nopw %cs:(%rax,%rax)
nop
// File: MyHush[P]hush-seeder/bitcoin.cpp
// Function: CNode::PushVersion()
void PushVersion() {
    int64 nTime = time(NULL);
    uint64 nLocalNonce = BITCOIN_SEED_NONCE;
    int64 nLocalServices = 0;
    CAddress me(CService("0.0.0.0"));
    BeginMessage("version");
    int nBestHeight = GetRequireHeight();
    string ver = "/hush-seeder:0.03/";
    vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me << nLocalNonce << ver << nBestHeight;
    EndMessage();
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
xorl %eax, %eax
movl %eax, -0xb4(%rbp)
movl %eax, %edi
callq 0x44a0
movl -0xb4(%rbp), %edx
movq %rax, -0x10(%rbp)
movabsq $0x539a019ca550825, %rax # imm = 0x539A019CA550825
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
leaq 0x2b0fe(%rip), %rsi     # 0x340ae
leaq -0x60(%rbp), %rdi
callq 0x16260
movw -0x50(%rbp), %cx
movq %rsp, %rax
movw %cx, 0x10(%rax)
movups -0x60(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0x1a2d0
movq -0xb0(%rbp), %rdi
leaq 0x2b0cf(%rip), %rsi     # 0x340b6
callq 0x99f0
leaq 0x42b7d(%rip), %rax     # 0x4bb70
movzbl (%rax), %edi
andl $0x1, %edi
callq 0x84c0
movl %eax, -0x64(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x4800
movq -0xa8(%rbp), %rdx
leaq 0x2b09c(%rip), %rsi     # 0x340be
leaq -0x88(%rbp), %rdi
callq 0x4690
jmp 0x9030
leaq -0x89(%rbp), %rdi
callq 0x4520
movq -0xb0(%rbp), %rdi
addq $0x8, %rdi
leaq 0x2b2aa(%rip), %rsi     # 0x342f8
callq 0x9a70
movq %rax, -0xc0(%rbp)
jmp 0x905c
movq -0xc0(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x9ab0
movq %rax, -0xc8(%rbp)
jmp 0x9075
movq -0xc8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x9ab0
movq %rax, -0xd0(%rbp)
jmp 0x908e
movq -0xd0(%rbp), %rdi
movq -0xb0(%rbp), %rsi
addq $0xa8, %rsi
callq 0x9af0
movq %rax, -0xd8(%rbp)
jmp 0x90b1
movq -0xd8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x9af0
movq %rax, -0xe0(%rbp)
jmp 0x90ca
movq -0xe0(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x9b30
movq %rax, -0xe8(%rbp)
jmp 0x90e3
movq -0xe8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x9b70
movq %rax, -0xf0(%rbp)
jmp 0x90ff
movq -0xf0(%rbp), %rdi
leaq -0x64(%rbp), %rsi
callq 0x9a70
jmp 0x9111
movq -0xb0(%rbp), %rdi
callq 0x9bb0
jmp 0x911f
leaq -0x88(%rbp), %rdi
callq 0x42f0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x89(%rbp), %rdi
callq 0x4520
jmp 0x9172
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x42f0
movq -0x98(%rbp), %rdi
callq 0x47f0
nop
// File: MyHush[P]hush-seeder/./db.h
// Function: CAddrInfo::GetBanTime() const
int GetBanTime() const {
    if (IsGood()) return 0;
    if (clientVersion && clientVersion < minimunClientVersion) { return 604800; }
    if (stat1M.reliability - stat1M.weight + 1.0 < 0.15 && stat1M.count > 32) { return 30*86400; }
    if (stat1W.reliability - stat1W.weight + 1.0 < 0.10 && stat1W.count > 16) { return 7*86400; }
    if (stat1D.reliability - stat1D.weight + 1.0 < 0.05 && stat1D.count > 8) { return 1*86400; }
    return 0;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x1c090
testb $0x1, %al
jne 0x1c38f
jmp 0x1c39b
movl $0x0, -0x4(%rbp)
jmp 0x1c4a9
movq -0x18(%rbp), %rax
cmpl $0x0, 0x7c(%rax)
je 0x1c3be
movq -0x18(%rbp), %rax
cmpl $0x29812, 0x7c(%rax)    # imm = 0x29812
jge 0x1c3be
movl $0x93a80, -0x4(%rbp)    # imm = 0x93A80
jmp 0x1c4a9
movq -0x18(%rbp), %rax
movss 0x78(%rax), %xmm0
subss 0x70(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x18660(%rip), %xmm0    # 0x34a38
addsd %xmm0, %xmm1
movsd 0x186a4(%rip), %xmm0    # 0x34a88
ucomisd %xmm1, %xmm0
jbe 0x1c40c
movq -0x18(%rbp), %rax
movss 0x74(%rax), %xmm0
movss 0x186b5(%rip), %xmm1    # 0x34ab0
ucomiss %xmm1, %xmm0
jbe 0x1c40c
movl $0x278d00, -0x4(%rbp)   # imm = 0x278D00
jmp 0x1c4a9
movq -0x18(%rbp), %rax
movss 0x6c(%rax), %xmm0
subss 0x64(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x18612(%rip), %xmm0    # 0x34a38
addsd %xmm0, %xmm1
movsd 0x1865e(%rip), %xmm0    # 0x34a90
ucomisd %xmm1, %xmm0
jbe 0x1c457
movq -0x18(%rbp), %rax
movss 0x68(%rax), %xmm0
movss 0x18663(%rip), %xmm1    # 0x34aac
ucomiss %xmm1, %xmm0
jbe 0x1c457
movl $0x93a80, -0x4(%rbp)    # imm = 0x93A80
jmp 0x1c4a9
movq -0x18(%rbp), %rax
movss 0x60(%rax), %xmm0
subss 0x58(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x185c7(%rip), %xmm0    # 0x34a38
addsd %xmm0, %xmm1
movsd 0x1861b(%rip), %xmm0    # 0x34a98
ucomisd %xmm1, %xmm0
jbe 0x1c4a2
movq -0x18(%rbp), %rax
movss 0x5c(%rax), %xmm0
movss 0x18614(%rip), %xmm1    # 0x34aa8
ucomiss %xmm1, %xmm0
jbe 0x1c4a2
movl $0x15180, -0x4(%rbp)    # imm = 0x15180
jmp 0x1c4a9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: MyHush[P]hush-seeder/main.cpp
// Function: ThreadSeeder
void* ThreadSeeder(void*) {
  //if (!fTestNet){
  //  db.Add(CService("kjy2eqzk4zwi5zd3.onion", 8888), true);
  //}
  do {
    for (int i=0; seeds[i] != ""; i++) {
      vector<CNetAddr> ips;
      LookupHost(seeds[i].c_str(), ips);
      for (vector<CNetAddr>::iterator it = ips.begin(); it != ips.end(); it++) {
        db.Add(CService(*it, GetDefaultPort()), true);
      }
    }
    Sleep(1800000);
  } while(1);
  return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq 0x263ab(%rip), %rdi     # 0x4b4e8
movslq -0xc(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
leaq 0xf656(%rip), %rsi      # 0x347a5
callq 0x26f30
testb $0x1, %al
jne 0x2515d
jmp 0x25296
leaq -0x28(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x16c90
movq 0x26374(%rip), %rdi     # 0x4b4e8
movslq -0xc(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x41e0
movq -0x98(%rbp), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x112a0
jmp 0x2519c
leaq -0x28(%rbp), %rdi
callq 0x17760
movq %rax, -0x40(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x175e0
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x26f60
testb $0x1, %al
jne 0x251cc
jmp 0x2527f
leaq -0x40(%rbp), %rdi
callq 0x27020
movq %rax, -0xa8(%rbp)
movzbl 0x2698d(%rip), %edi     # 0x4bb70
andl $0x1, %edi
callq 0x252c0
movw %ax, -0x9a(%rbp)
jmp 0x251f4
movq -0xa8(%rbp), %rsi
movw -0x9a(%rbp), %ax
movzwl %ax, %edx
leaq -0x88(%rbp), %rdi
callq 0x16020
jmp 0x25213
movw -0x78(%rbp), %cx
movq %rsp, %rax
movw %cx, 0x10(%rax)
movups -0x88(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0x70(%rbp), %rdi
movl $0x1, %esi
callq 0x1a2d0
jmp 0x25238
leaq 0x26939(%rip), %rdi     # 0x4bb78
leaq -0x70(%rbp), %rsi
movl $0x1, %edx
callq 0x26fa0
jmp 0x2524f
jmp 0x25251
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x27040
movq %rax, -0x90(%rbp)
jmp 0x251a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x16da0
jmp 0x252b7
leaq -0x28(%rbp), %rdi
callq 0x16da0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x25136
movl $0x1b7740, %edi         # imm = 0x1B7740
callq 0x24530
movb $0x1, %al
testb $0x1, %al
jne 0x2512f
jmp 0x252ac
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x47f0
// File: olahol[P]cpp-csp/examples/select.cpp
// Function: main
int main() {
  csp::Scheduler scheduler;
  csp::Channel<int> ch1, ch2;

  scheduler.spawn([&]() {
    std::chrono::milliseconds dura(100);
    for (;;) {
      int n = csp::select(ch2, ch1);
      std::cout << "got chan " << n << std::endl;
      switch (n) {
        case 0:
          ch2.get();
          std::cout << "exit" << std::endl;
          return;
        case 1:
          ch1.get();
          std::this_thread::sleep_for(dura);
          break;
      }
    }
  });

  scheduler.spawn([&]() {
    std::chrono::milliseconds dura(10);
    std::this_thread::sleep_for(dura);
    ch2.put(2);
  });

  ch1.put(1);
  ch1.put(1);
  ch1.put(1);
  ch1.put(1);

  std::cout << "join" << std::endl;
  scheduler.join();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
leaq -0x18(%rbp), %rdi
callq 0x2e60
leaq -0xc8(%rbp), %rdi
callq 0x2e80
jmp 0x2362
leaq -0x188(%rbp), %rdi
callq 0x2e80
jmp 0x2370
leaq -0x188(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0xc8(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x198(%rbp), %rsi
movq -0x190(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0x24e0
jmp 0x23a5
leaq -0x188(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x2570
jmp 0x23c5
leaq -0xc8(%rbp), %rdi
movl $0x1, %esi
callq 0x2ed0
jmp 0x23d8
leaq -0xc8(%rbp), %rdi
movl $0x1, %esi
callq 0x2ed0
jmp 0x23eb
leaq -0xc8(%rbp), %rdi
movl $0x1, %esi
callq 0x2ed0
jmp 0x23fe
leaq -0xc8(%rbp), %rdi
movl $0x1, %esi
callq 0x2ed0
jmp 0x2411
movq 0x7bc0(%rip), %rdi      # 0x9fd8
leaq 0x3be5(%rip), %rsi      # 0x6004
callq 0x2110
movq %rax, -0x1a8(%rbp)
jmp 0x242d
movq -0x1a8(%rbp), %rdi
movq 0x7b85(%rip), %rsi      # 0x9fc0
callq 0x2140
jmp 0x2442
leaq -0x18(%rbp), %rdi
callq 0x2fa0
jmp 0x244d
leaq -0x188(%rbp), %rdi
callq 0x3020
leaq -0xc8(%rbp), %rdi
callq 0x3020
leaq -0x18(%rbp), %rdi
callq 0x3050
xorl %eax, %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x24cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x24bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x3020
leaq -0xc8(%rbp), %rdi
callq 0x3020
leaq -0x18(%rbp), %rdi
callq 0x3050
movq -0xd0(%rbp), %rdi
callq 0x21e0
// File: olahol[P]cpp-csp/examples/../csp.hpp
// Function: int csp::select<int, int>(csp::Channel<int>&, csp::Channel<int>&)
inline int select(Channel<TItem>&... chans) {
    int n = -1;
    while (n == -1) {
      n = which(0, chans...);
    }
    return n;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
cmpl $-0x1, -0x14(%rbp)
jne 0x4291
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
xorl %edi, %edi
callq 0x4410
movl %eax, -0x14(%rbp)
jmp 0x4277
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)