LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::performDummyFinds(int)
void OAVLTreeDeterministicEviction::performDummyFinds(int num) {
    for (int i = 0; i < num; ++i) {
        auto leaf = rand_gen->getRandomLeaf();
        for (int i = 0; i < num_levels; i++) {
            vector<Block> blocks = storage->readBucket(P(leaf, i)).getBlocks();
            Bucket writeBack;
            for (Block &b: blocks) {
                writeBack.addBlock(b);
            }
            storage->writeBucket(P(leaf, i), writeBack);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
movl %esi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x30(%rsp), %r15
leaq 0x48(%rsp), %r13
cmpl 0x10(%rsp), %eax
je 0x47cd
movl %eax, 0x14(%rsp)
movq 0x10(%r14), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, 0xc(%rsp)
xorl %ebx, %ebx
cmpl 0x20(%r14), %ebx
jge 0x47c2
movq (%r14), %rax
movq 0x8(%r14), %r12
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %ebx, %edx
callq *0x10(%rax)
movq (%r12), %rcx
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
callq *0x8(%rcx)
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x2c1a
movq %r15, %rdi
callq 0x2d0c
movq %r15, %rdi
callq 0x28e4
movq 0x18(%rsp), %r12
movq 0x20(%rsp), %rbp
cmpq %rbp, %r12
je 0x4787
movq %r13, %rdi
movq %r12, %rsi
callq 0x253c
movq %r15, %rdi
movq %r13, %rsi
callq 0x2b68
movq %r13, %rdi
callq 0x2594
addq $0x30, %r12
jmp 0x475e
movq (%r14), %rax
movq 0x8(%r14), %r12
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %ebx, %edx
callq *0x10(%rax)
movq (%r12), %rcx
movq %r12, %rdi
movl %eax, %esi
movq %r15, %rdx
callq *0x10(%rcx)
movq %r15, %rdi
callq 0x2d0c
leaq 0x18(%rsp), %rdi
callq 0x2d0c
incl %ebx
jmp 0x470b
movl 0x14(%rsp), %eax
incl %eax
jmp 0x46ee
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x480e
movq %rax, %rbx
jmp 0x4809
jmp 0x47ed
movq %rax, %rbx
jmp 0x47ff
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2594
leaq 0x30(%rsp), %rdi
callq 0x2d0c
leaq 0x18(%rsp), %rdi
callq 0x2d0c
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::evictTwoPaths()
void OAVLTreeDeterministicEviction::evictTwoPaths() {
    int g_1 = ReverseBits(this->G, num_levels - 1);
    this->G += 1;
    this->evictByLeaf(g_1);
    int g_2 = ReverseBits(this->G, num_levels - 1);
    this->G += 1;
    this->evictByLeaf(g_2);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %ebp
movl 0x20(%rdi), %edx
decl %edx
movl %ebp, %esi
callq 0x4ac2
incl %ebp
movl %ebp, 0x18(%rbx)
movq %rbx, %rdi
movl %eax, %esi
callq 0x4ae2
movl 0x18(%rbx), %ebp
movl 0x20(%rbx), %edx
decl %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4ac2
incl %ebp
movl %ebp, 0x18(%rbx)
movq %rbx, %rdi
movl %eax, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4ae2
nop
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::search(int)
int OAVLTreeDeterministicEviction::search(int key) {
    if (root.id == -1) throw SearchFailureException();
    moveToLocal(root.leaf_id, root.id);
    Block b = local[0];
    while (b.data[0] != key) {
        if (b.data[0] < key) {
            if (b.rightChildId != -1) {
                moveToLocal(b.rightChildPos, b.rightChildId);
            } else {
                evictAfterSearch();
                throw SearchFailureException();
            }
        } else {
            if (b.leftChildId != -1) {
                moveToLocal(b.leftChildPos, b.leftChildId);
            } else {
                evictAfterSearch();
                throw SearchFailureException();
            }
        }
        b = local[local.size() - 1];
    }
    int val = b.data[1];
    int l = local.size();
    performDummyFinds(num_levels - l);
    evictAfterSearch();
    performDummyEvictions(num_levels - l);
    return val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl 0x68(%rdi), %edx
cmpl $-0x1, %edx
je 0x49d4
movl %esi, %ebp
movq %rdi, %rbx
movl 0x6c(%rdi), %esi
callq 0x3d28
movq 0x48(%rbx), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x253c
leaq 0x20(%rsp), %r15
leaq 0x28(%rsp), %r12
cmpl %ebp, 0x10(%rsp)
je 0x4961
jge 0x492b
movl 0x2c(%rsp), %edx
movq %r12, %rax
jmp 0x4932
movl 0x24(%rsp), %edx
movq %r15, %rax
cmpl $-0x1, %edx
je 0x49b3
movl (%rax), %esi
movq %rbx, %rdi
callq 0x3d28
movq 0x50(%rbx), %rax
movq -0x8(%rax), %rcx
movq %rcx, 0x28(%r14)
movups -0x28(%rax), %xmm0
movups -0x18(%rax), %xmm1
movups %xmm1, 0x18(%r14)
movups %xmm0, 0x8(%r14)
jmp 0x491a
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
movl 0x14(%rsp), %ebp
pushq $0x30
popq %rcx
cqto
idivq %rcx
movq %rax, %r14
movl 0x20(%rbx), %esi
subl %r14d, %esi
movq %rbx, %rdi
callq 0x46c8
movq %rbx, %rdi
callq 0x4a04
movl 0x20(%rbx), %esi
subl %r14d, %esi
movq %rbx, %rdi
callq 0x4868
movq %rsp, %rdi
callq 0x2594
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x4a04
pushq $0x1
popq %rdi
callq 0x20d0
leaq 0x826e(%rip), %rsi      # 0xcc38
movq %rax, %rdi
xorl %edx, %edx
callq 0x2290
pushq $0x1
popq %rdi
callq 0x20d0
leaq 0x8255(%rip), %rsi      # 0xcc38
movq %rax, %rdi
xorl %edx, %edx
callq 0x2290
jmp 0x49f1
jmp 0x49f1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2594
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::evictAfterSearch()
void OAVLTreeDeterministicEviction::evictAfterSearch() {
    while (local.size() > 1)
    {
        local[local.size()-1].leaf_id = rand_gen->getRandomLeaf();
        if (local[local.size()-2].leftChildId == local[local.size()-1].id) {
            local[local.size()-2].leftChildPos = local[local.size()-1].leaf_id;
        } else local[local.size()-2].rightChildPos = local[local.size()-1].leaf_id;
        stash.push_back(local[local.size()-1]);
        local.pop_back();
        evictTwoPaths();
    }
    local[0].leaf_id = rand_gen->getRandomLeaf();
    stash.push_back(local[0]);
    root.id = local[0].id;
    root.leaf_id = local[0].leaf_id;
    local.pop_back();
    evictTwoPaths();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
pushq $0x30
popq %r12
movq 0x10(%rbx), %rdi
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
cqto
idivq %r12
movq %rax, %r15
movq (%rdi), %rax
callq *(%rax)
cmpq $0x2, %r15
jb 0x4a7b
movq 0x50(%rbx), %rcx
leaq -0x30(%rcx), %rsi
movl %eax, -0x28(%rcx)
movl -0x3c(%rcx), %edx
xorl %edi, %edi
cmpl -0x24(%rcx), %edx
setne %dil
shll $0x3, %edi
orq $-0x40, %rdi
movl %eax, (%rcx,%rdi)
movq %r14, %rdi
callq 0x2d80
movq 0x50(%rbx), %rax
leaq -0x30(%rax), %rdi
movq %rdi, 0x50(%rbx)
movq -0x30(%rax), %rax
callq *(%rax)
movq %rbx, %rdi
callq 0x481c
jmp 0x4a17
movq 0x48(%rbx), %rsi
movl %eax, 0x8(%rsi)
movq %r14, %rdi
callq 0x2d80
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rcx
movq 0x8(%rax), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x68(%rbx)
leaq -0x30(%rcx), %rdi
movq %rdi, 0x50(%rbx)
movq -0x30(%rcx), %rax
callq *(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x481c
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/OAVLTreePathEviction.cpp
// Function: OAVLTreePathEviction::evictTwoPaths()
void OAVLTreePathEviction::evictTwoPaths() {
    int random_leaf_one = this->rand_gen->getRandomLeaf()/2;
    int random_leaf_two = this->rand_gen->getRandomLeaf()/2 + this->num_leaves/2;
    this->evictByLeaf(random_leaf_one);
    this->evictByLeaf(random_leaf_two);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq (%rdi), %rax
callq *(%rax)
pushq $0x2
popq %r15
cltd
idivl %r15d
movl %eax, %ebp
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
cltd
idivl %r15d
movl %eax, %r14d
movl 0x20(%rbx), %eax
cltd
idivl %r15d
addl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6100
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6100
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/RandomForOram.cpp
// Function: RandomForOram::RandomForOram()
RandomForOram::RandomForOram() {

	if (this->is_initialized) {
		throw new runtime_error("ONLY ONE RANDOM INSTANCE CAN BE USED AT A TIME");
	}
	this->rng(long());
	this->rand_history = vector<int>();
	is_initialized  = true;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
leaq 0x67a9(%rip), %rax      # 0xcce0
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
andq $0x0, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x1, 0x20(%rdi)
addq $0x28, %rdi
callq 0x693a
andq $0x0, 0x13b0(%r14)
addq $0x13b8, %r14           # imm = 0x13B8
movq %r14, %rdi
callq 0x6944
cmpb $0x1, 0x6c2f(%rip)      # 0xd1a8
je 0x65c1
movq %rsp, %rsi
andq $0x0, (%rsi)
movq %r14, %rdi
callq 0x69ac
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c32
movq %r14, %rdi
callq 0x3750
movb $0x1, 0x6bf5(%rip)      # 0xd1a8
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %r15
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r13
leaq 0x1d52(%rip), %rsi      # 0x8330
movq %rax, %rdi
callq 0x2080
movq %r13, (%r15)
leaq 0x65b0(%rip), %rsi      # 0xcba0
movq %r15, %rdi
xorl %edx, %edx
callq 0x2290
jmp 0x6619
movq %rax, %r12
pushq $0x10
popq %rsi
movq %r13, %rdi
callq 0x21a0
jmp 0x660f
movq %rax, %r12
movq %r15, %rdi
callq 0x2110
jmp 0x661c
movq %rax, %r12
movq %r14, %rdi
callq 0x69be
jmp 0x6629
movq %rax, %r12
movq %rbx, %rdi
callq 0x3750
movq %r12, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/RandomForOram.cpp
// Function: RandomForOram::getRandomLeaf()
int RandomForOram::getRandomLeaf() {
	
	long next = this->rng();
	int randVal = next % this->bound;
	if (randVal < 0) {
		randVal += this->bound;
	}
	//this->rand_history.push_back(randVal);
	return randVal;
}

// Assembly:
pushq %rax
addq $0x13b8, %rdi           # imm = 0x13B8
callq 0x69d8
movslq 0x6b4e(%rip), %rcx      # 0xd19c
cqto
idivq %rcx
movq %rdx, %rax
sarq $0x3f, %rax
andl %eax, %ecx
addl %edx, %ecx
movl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/RandomForOram.cpp
// Function: RandomForOram::RandomForOramMT()
void RandomForOram::RandomForOramMT() {

	if (this->is_initialized) {
		throw new runtime_error("ONLY ONE RANDOM INSTANCE CAN BE USED AT A TIME");
	}

	std::random_device seed1;
	std::mt19937 mt_generator(seed1()); 

	this->rand_history = vector<int>();
	is_initialized  = true;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2730, %rsp           # imm = 0x2730
cmpb $0x1, 0x6b33(%rip)      # 0xd1a8
je 0x66e2
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x69ea
movq %r14, %rdi
callq 0x21e0
movl %eax, %esi
leaq 0x13a8(%rsp), %rdi
callq 0x6b94
addq $0x8, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6c32
movq %r14, %rdi
callq 0x3750
movb $0x1, 0x6add(%rip)      # 0xd1a8
leaq 0x20(%rsp), %rdi
callq 0x6a40
addq $0x2730, %rsp           # imm = 0x2730
popq %rbx
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r15
leaq 0x1c31(%rip), %rsi      # 0x8330
movq %rax, %rdi
callq 0x2080
movq %r15, (%rbx)
leaq 0x648f(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2290
movq %rax, %r14
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x21a0
jmp 0x672e
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
jmp 0x6745
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x6a40
movq %r14, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/RandomForOram.cpp
// Function: RandomForOram::getRandomLeafMT()
int RandomForOram::getRandomLeafMT() {
	long next = mt_generator();
	int randVal = next % this->bound;
	this->rand_history.push_back(randVal);
	return randVal;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x6a50
movslq 0x6a37(%rip), %rcx      # 0xd19c
cqto
idivq %rcx
leaq 0x4(%rsp), %r14
movl %edx, (%r14)
addq $0x8, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36d4
movl (%r14), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/RandomForOram.cpp
// Function: RandomForOram::RandomForOramLCG()
void RandomForOram::RandomForOramLCG() {

	if (this->is_initialized) {
		throw new runtime_error("ONLY ONE RANDOM INSTANCE CAN BE USED AT A TIME");
	}
	linear_congruential_engine<unsigned long, 0x5DEECE66DL, 11, 281474976710656> rnd_generator;
	rnd_generator.seed(0L);
	this->seed = (seed ^ 0x5DEECE66DL) & ((1L << 48) - 1);
	this->rand_history = vector<int>();
	is_initialized  = true;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpb $0x1, 0x6a0c(%rip)      # 0xd1a8
je 0x67f6
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq 0x13b0(%rdi), %rax
movabsq $0x5deece66d, %rcx      # imm = 0x5DEECE66D
xorq %rax, %rcx
movq %rcx, 0x13b0(%rdi)
addq $0x8, %rdi
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rsi
callq 0x6c32
movq %rbx, %rdi
callq 0x3750
movb $0x1, 0x69bc(%rip)      # 0xd1a8
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r14
leaq 0x1b1d(%rip), %rsi      # 0x8330
movq %rax, %rdi
callq 0x2080
movq %r14, (%rbx)
leaq 0x637b(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2290
movq %rax, %r15
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x21a0
jmp 0x6842
movq %rax, %r15
movq %rbx, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/RandomForOram.cpp
// Function: RandomForOram::getRandomLeafLCG()
int RandomForOram::getRandomLeafLCG() {
	long next = (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1);//rnd_generator();
	this->seed = next;
	int bits = next >> (48 - 31);
	int randVal = 0;
	if ((this->bound & -this->bound) == this->bound) {  // i.e., bound is a power of 2
    	randVal = (int)((this->bound * (long)bits) >> 31);
    	return randVal;
    }
	int val = bits % this->bound;
	while (bits - val + (bound-1) < 0) {
		next = (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1);//rnd_generator();
		this->seed = next;
		bits = next >> (48 - 31);
		val = bits % this->bound;
	}
	randVal = val;
	this->rand_history.push_back(randVal);
	return randVal;
}

// Assembly:
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
movabsq $0x5deece66d, %r8       # imm = 0x5DEECE66D
movq 0x13b0(%rdi), %r9
imulq %r8, %r9
addq $0xb, %r9
andq %rsi, %r9
movq %r9, 0x13b0(%rdi)
movq %r9, %rcx
shrq $0x11, %rcx
movslq 0x690f(%rip), %r10      # 0xd19c
leal -0x1(%r10), %eax
testl %eax, %r10d
jne 0x68a0
imulq %r10, %rcx
shrq $0x1f, %rcx
jmp 0x68e7
movl %ecx, %eax
cltd
idivl %r10d
addl %r10d, %ecx
cmpl %ecx, %edx
js 0x68c8
imulq %r8, %r9
addq $0xb, %r9
andq %rsi, %r9
movq %r9, 0x13b0(%rdi)
movq %r9, %rcx
shrq $0x11, %rcx
jmp 0x68a0
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl %edx, (%rbx)
addq $0x8, %rdi
movq %rbx, %rsi
callq 0x36d4
movl (%rbx), %ecx
addq $0x10, %rsp
popq %rbx
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/ServerStorage.cpp
// Function: ServerStorage::setCapacity(int)
void ServerStorage::setCapacity(int totalNumOfBuckets) {
	if (this->is_capacity_set) {
		throw new runtime_error("Capacity of ServerStorage cannot be changed");
	}
	this->is_capacity_set = true;
	this->capacity = totalNumOfBuckets;
	this->buckets.assign(totalNumOfBuckets, Bucket());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpb $0x1, 0x6359(%rip)      # 0xd1ab
je 0x6e97
movq %rdi, %rbx
movb $0x1, 0x634d(%rip)      # 0xd1ab
movl %esi, 0x20(%rdi)
addq $0x8, %rbx
movslq %esi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x28e4
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x77fa
leaq 0x8(%rsp), %rdi
callq 0x2d0c
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r15
leaq 0x15a2(%rip), %rsi      # 0x8456
movq %rax, %rdi
callq 0x2080
movq %r15, (%rbx)
leaq 0x5cda(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2290
movq %rax, %r14
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x21a0
jmp 0x6ee3
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
jmp 0x6efa
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x2d0c
movq %r14, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/ServerStorage.cpp
// Function: ServerStorage::readBucket(int)
Bucket ServerStorage::readBucket(int position) {
	if (!this->is_capacity_set) {
		throw new runtime_error("Please call setCapacity before reading or writing any block");
	}

	if (position >= this->capacity || position < 0) {
		//std::ostringstream positionStream;
		//positionStream << position;
		throw new runtime_error("You are trying to access Bucket " + to_string(position) + ", but this Server contains only " + to_string(this->capacity) + " buckets.");
	}
	return this->buckets.at(position);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
cmpb $0x0, 0x6293(%rip)      # 0xd1ab
je 0x6f58
movl %edx, %ebp
movq %rsi, %r15
testl %edx, %edx
js 0x6f91
cmpl %ebp, 0x20(%r15)
jle 0x6f91
movq %rdi, %rbx
addq $0x8, %r15
movl %ebp, %esi
movq %r15, %rdi
callq 0x7510
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2db2
movq %rbx, %rax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r14
leaq 0x150d(%rip), %rsi      # 0x8482
movq %rax, %rdi
callq 0x2080
movq %r14, (%rbx)
leaq 0x5c19(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2290
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x275b
leaq 0x1504(%rip), %rsi      # 0x84be
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x74eb
leaq 0x150f(%rip), %rdx      # 0x84df
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x7465
movl 0x20(%r15), %esi
movq %rsp, %rdi
callq 0x275b
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq %rsp, %rdx
callq 0x7484
leaq 0x14f9(%rip), %rdx      # 0x8500
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x7465
movb $0x1, %r12b
leaq 0xa0(%rsp), %rsi
movq %r14, %rdi
callq 0x2250
movq %r14, (%rbx)
xorl %r12d, %r12d
leaq 0x5b64(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2290
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x20b0
jmp 0x705e
movq %rax, %r15
movb $0x1, %r12b
leaq 0x80(%rsp), %rdi
callq 0x20b0
jmp 0x7073
movq %rax, %r15
movb $0x1, %r12b
movq %rsp, %rdi
callq 0x20b0
jmp 0x7083
movq %rax, %r15
movb $0x1, %r12b
leaq 0x60(%rsp), %rdi
callq 0x20b0
jmp 0x7095
movq %rax, %r15
movb $0x1, %r12b
leaq 0x40(%rsp), %rdi
callq 0x20b0
jmp 0x70a7
movq %rax, %r15
movb $0x1, %r12b
leaq 0x20(%rsp), %rdi
callq 0x20b0
testb %r12b, %r12b
jne 0x70bd
jmp 0x70d7
jmp 0x70ba
movq %rax, %r15
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x21a0
jmp 0x70cf
jmp 0x70cc
movq %rax, %r15
movq %rbx, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/ServerStorage.cpp
// Function: ServerStorage::writeBucket(int, Bucket const&)
void ServerStorage::writeBucket(int position, const Bucket& bucket_to_write) {
	if (!this->is_capacity_set) {
		throw new runtime_error("Please call setCapacity before reading or writing any block");
	}

	if (position >= this->capacity || position < 0) {
		throw new runtime_error("You are trying to access Bucket " + to_string(position) + ", but this Server contains only " + to_string(this->capacity) + " buckets.");
	}

	this->buckets.at(position) = bucket_to_write;
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
cmpb $0x0, 0x60b5(%rip)      # 0xd1ab
je 0x7132
movl %esi, %ebp
movq %rdi, %r15
testl %esi, %esi
js 0x716b
cmpl %ebp, 0x20(%r15)
jle 0x716b
movq %rdx, %rbx
addq $0x8, %r15
movl %ebp, %esi
movq %r15, %rdi
callq 0x7510
movq %rax, %rdi
movq %rbx, %rsi
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x752e
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r14
leaq 0x1333(%rip), %rsi      # 0x8482
movq %rax, %rdi
callq 0x2080
movq %r14, (%rbx)
leaq 0x5a3f(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2290
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x275b
leaq 0x132a(%rip), %rsi      # 0x84be
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x74eb
leaq 0x1335(%rip), %rdx      # 0x84df
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x7465
movl 0x20(%r15), %esi
movq %rsp, %rdi
callq 0x275b
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq %rsp, %rdx
callq 0x7484
leaq 0x131f(%rip), %rdx      # 0x8500
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x7465
movb $0x1, %r12b
leaq 0xa0(%rsp), %rsi
movq %r14, %rdi
callq 0x2250
movq %r14, (%rbx)
xorl %r12d, %r12d
leaq 0x598a(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2290
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x20b0
jmp 0x7238
movq %rax, %r15
movb $0x1, %r12b
leaq 0x80(%rsp), %rdi
callq 0x20b0
jmp 0x724d
movq %rax, %r15
movb $0x1, %r12b
movq %rsp, %rdi
callq 0x20b0
jmp 0x725d
movq %rax, %r15
movb $0x1, %r12b
leaq 0x60(%rsp), %rdi
callq 0x20b0
jmp 0x726f
movq %rax, %r15
movb $0x1, %r12b
leaq 0x40(%rsp), %rdi
callq 0x20b0
jmp 0x7281
movq %rax, %r15
movb $0x1, %r12b
leaq 0x20(%rsp), %rdi
callq 0x20b0
testb %r12b, %r12b
jne 0x7297
jmp 0x72b1
jmp 0x7294
movq %rax, %r15
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x21a0
jmp 0x72a9
jmp 0x72a6
movq %rax, %r15
movq %rbx, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/main.cpp
// Function: main
int main() {
    CorrectnessTester* tester = new CorrectnessTester;
    //make sure ONLY ONE runTester is uncommented before compiling
    // tester->runTester1();
    tester->runTester2();
    delete tester;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
movq %rbx, %rdi
callq 0x2190
movq %rax, %r14
movq %rax, %rdi
callq 0x3434
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::run_editor()
int Editor::run_editor() {

    while (!m_stopped) {
        if (m_contents->size() == 0) {
            m_contents->push_back("");
        }

        print_contents_on_line(m_current_line);
        
        char input = Utils::getch();
        switch (input) {
        case 'e':
            edit_command();
            break;
        case 'm':
            move_to_command();
            break;
        case 'w':
            write_command();
            break;
        case 'q':
            quit_command();
            break;
        case 'd':
            delete_and_clamp_command();
            break;
        case 'a':
            append_after_command();
            break;
        case 'b':
            prepend_before_command();
            break;
        case 's':
            swap_lines_command();
            break;
        default:
            std::cout << "Not a recognized command " << input << ".\n";
            break;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x1bc3(%rip), %r14      # 0x4065
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %r12
leaq 0x1b51(%rip), %r13      # 0x4004
cmpb $0x0, 0x2c(%rbx)
jne 0x25ca
movq (%rbx), %rbp
movq 0x8(%rbp), %rax
cmpq (%rbp), %rax
jne 0x24eb
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2ff4
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3098
movq %r15, %rdi
callq 0x2090
movl 0x28(%rbx), %esi
movq %rbx, %rdi
callq 0x25f0
callq 0x3aa4
movl %eax, %ebp
movzbl %al, %eax
leal -0x61(%rax), %ecx
cmpl $0x4, %ecx
jbe 0x2532
cmpl $0x6d, %eax
je 0x25a3
cmpl $0x71, %eax
je 0x25bd
cmpl $0x73, %eax
je 0x25b0
cmpl $0x77, %eax
jne 0x2549
movq %rbx, %rdi
callq 0x288a
jmp 0x24b3
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x29aa
jmp 0x24b3
movq 0x4a80(%rip), %rdi      # 0x6fd0
leaq 0x1ac1(%rip), %rsi      # 0x4018
callq 0x2150
movsbl %bpl, %esi
movq %rax, %rdi
callq 0x21a0
movq %rax, %rdi
leaq 0x1ac2(%rip), %rsi      # 0x4034
callq 0x2150
jmp 0x24b3
movq %rbx, %rdi
callq 0x2732
jmp 0x24b3
movq %rbx, %rdi
callq 0x28f4
jmp 0x24b3
movq %rbx, %rdi
callq 0x2a60
jmp 0x24b3
movq %rbx, %rdi
callq 0x27d8
jmp 0x24b3
movq %rbx, %rdi
callq 0x2b16
jmp 0x24b3
movq %rbx, %rdi
callq 0x28b8
jmp 0x24b3
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::print_contents_on_line(int) const
int Editor::print_contents_on_line(int line) const {
    Utils::clear_screen();

    int file_length = m_contents->size();
    int line_diff = Utils::window_height() / 2 - 2;
    int start_line = std::max(0, line - line_diff);
    int end_line = std::max(0, std::min(file_length - 1, line + line_diff));

    int line_number_width = Utils::count_digits(m_contents->size());

    if (start_line != 0) {
        std::cout << "...\n";
    }

    for (int i = start_line; i <= end_line; i++) {
        if (i == line) {
            std::cout << "> ";
        }

        std::cout << std::setw(line_number_width) << i;
        std::cout << " " << m_contents->at(i) << '\n';
    }

    if (end_line != file_length - 1) {
        std::cout << "...\n";
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %r12
callq 0x3b90
movq (%r12), %rax
movq 0x8(%rax), %r15
subq (%rax), %r15
shrq $0x5, %r15
callq 0x3b6b
pushq $0x2
popq %rcx
cltd
idivl %ecx
leal -0x2(%rax), %ecx
movl %r14d, %ebx
subl %ecx, %ebx
decl %r15d
addl %r14d, %eax
addl $-0x2, %eax
cmpl %r15d, %eax
movq %r15, 0x8(%rsp)
cmovgel %r15d, %eax
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %eax
movl %eax, 0x4(%rsp)
movq %r12, 0x10(%rsp)
movq (%r12), %rax
movq 0x8(%rax), %rdi
subq (%rax), %rdi
shrq $0x5, %rdi
callq 0x3bbb
movl %eax, %ebp
testl %ebx, %ebx
cmovlel %r15d, %ebx
jle 0x2683
movq 0x4959(%rip), %rdi      # 0x6fd0
leaq 0x19b4(%rip), %rsi      # 0x4032
callq 0x2150
movslq %ebp, %r13
movl %ebx, %r15d
movl %r14d, %ebp
movl 0x4(%rsp), %ebx
movq 0x4939(%rip), %r14      # 0x6fd0
cmpq %rbx, %r15
ja 0x2704
cmpq %r15, %rbp
jne 0x26b0
movq %r14, %rdi
leaq 0x198c(%rip), %rsi      # 0x4037
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r13, 0x10(%r14,%rax)
movq %r14, %rdi
movl %r15d, %esi
callq 0x22b0
movq %r14, %rdi
leaq 0x1967(%rip), %rsi      # 0x4038
callq 0x2150
movq %rax, %r12
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq %r15, %rsi
callq 0x3030
movq %r12, %rdi
movq %rax, %rsi
callq 0x2140
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x21a0
incq %r15
jmp 0x2697
movl 0x4(%rsp), %eax
cmpl 0x8(%rsp), %eax
je 0x2721
movq 0x48bb(%rip), %rdi      # 0x6fd0
leaq 0x1916(%rip), %rsi      # 0x4032
callq 0x2150
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::edit_command()
int Editor::edit_command() {
    std::cout << "Edit which line? ";
    int line;
    std::cin >> line; 
    if (std::cin.fail() || line < 0) {
        std::cout << "Not a valid line number!\n";
        std::cin.clear();
        std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
        return 1;
    }

    return edit_line(line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x488b(%rip), %rdi      # 0x6fd0
leaq 0x18ee(%rip), %rsi      # 0x403a
callq 0x2150
movq 0x4888(%rip), %rbx      # 0x6fe0
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
setne %al
movl (%r15), %esi
testl %esi, %esi
sets %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x27c4
movq 0x4843(%rip), %rdi      # 0x6fd0
leaq 0x18b8(%rip), %rsi      # 0x404c
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2290
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
pushq $0xa
popq %rdx
movq %rbx, %rdi
callq 0x20e0
pushq $0x1
popq %rax
jmp 0x27ce
movq %r14, %rdi
callq 0x2c20
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::move_to_command()
int Editor::move_to_command() {
    std::cout << "Move to which line? ";
    int line;
    std::cin >> line;
    if (std::cin.fail() || line < 0 || line >= (int) m_contents->size()) {
        std::cout << "Not a valid line number!\n";
        std::cin.clear();
        std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
        return 1;
    }

    return move_to_line(line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x47e5(%rip), %rdi      # 0x6fd0
leaq 0x1874(%rip), %rsi      # 0x4066
callq 0x2150
movq 0x47e2(%rip), %rbx      # 0x6fe0
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
setne %cl
movl (%r15), %eax
testl %eax, %eax
sets %dl
orb %cl, %dl
jne 0x2843
movq (%r14), %rcx
movq 0x8(%rcx), %rdx
subq (%rcx), %rdx
shrq $0x5, %rdx
cmpl %edx, %eax
jge 0x2843
movl %eax, 0x28(%r14)
xorl %eax, %eax
jmp 0x287f
movq 0x4786(%rip), %rdi      # 0x6fd0
leaq 0x17fb(%rip), %rsi      # 0x404c
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2290
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
pushq $0xa
popq %rdx
movq %rbx, %rdi
callq 0x20e0
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::write_command()
int Editor::write_command() {
    std::cout << "Write to file? [y/n] ";
    char answer = Utils::getch();

    if (answer == 'y') {
        return write();
    }

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x473b(%rip), %rdi      # 0x6fd0
leaq 0x17df(%rip), %rsi      # 0x407b
callq 0x2150
callq 0x3aa4
cmpb $0x79, %al
jne 0x28b3
movq %rbx, %rdi
popq %rbx
jmp 0x2d28
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::quit_command()
int Editor::quit_command() {
    std::cout << "Really quit? [y/n] ";
    char answer = Utils::getch();

    if (answer == 'y') {
        m_stopped = true;
        std::cout << "\n";
    }

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x470d(%rip), %rdi      # 0x6fd0
leaq 0x17e6(%rip), %rsi      # 0x40b0
callq 0x2150
callq 0x3aa4
cmpb $0x79, %al
jne 0x28ef
movb $0x1, 0x2c(%rbx)
movq 0x46ed(%rip), %rdi      # 0x6fd0
leaq 0x177a(%rip), %rsi      # 0x4064
callq 0x2150
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::delete_and_clamp_command()
int Editor::delete_and_clamp_command() {
    std::cout << "Delete and clamp which line? ";
    int line;
    std::cin >> line;
    if (std::cin.fail() || line < 0 || line >= (int) m_contents->size()) {
        std::cout << "Not a valid line number!\n";
        std::cin.clear();
        std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
        return 1;
    }

    return delete_and_clamp(line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x46c9(%rip), %rdi      # 0x6fd0
leaq 0x17b6(%rip), %rsi      # 0x40c4
callq 0x2150
movq 0x46c6(%rip), %rbx      # 0x6fe0
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
setne %al
movl (%r15), %esi
testl %esi, %esi
sets %cl
orb %al, %cl
jne 0x2963
movq (%r14), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x5, %rcx
cmpl %ecx, %esi
jge 0x2963
movq %r14, %rdi
callq 0x2e18
xorl %eax, %eax
jmp 0x299f
movq 0x4666(%rip), %rdi      # 0x6fd0
leaq 0x16db(%rip), %rsi      # 0x404c
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2290
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
pushq $0xa
popq %rdx
movq %rbx, %rdi
callq 0x20e0
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::append_after_command()
int Editor::append_after_command() {
    std::cout << "Append after which line? ";
    int line;
    std::cin >> line;
    if (std::cin.fail() || line < 0 || line >= (int) m_contents->size()) {
        std::cout << "Not a valid line number!\n";
        std::cin.clear();
        std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
        return 1;
    }

    return append_after_line(line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x4613(%rip), %rdi      # 0x6fd0
leaq 0x171e(%rip), %rsi      # 0x40e2
callq 0x2150
movq 0x4610(%rip), %rbx      # 0x6fe0
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
setne %al
movl (%r15), %esi
testl %esi, %esi
sets %cl
orb %al, %cl
jne 0x2a19
movq (%r14), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x5, %rcx
cmpl %ecx, %esi
jge 0x2a19
movq %r14, %rdi
callq 0x2e30
xorl %eax, %eax
jmp 0x2a55
movq 0x45b0(%rip), %rdi      # 0x6fd0
leaq 0x1625(%rip), %rsi      # 0x404c
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2290
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
pushq $0xa
popq %rdx
movq %rbx, %rdi
callq 0x20e0
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::prepend_before_command()
int Editor::prepend_before_command() {
    std::cout << "Prepend before which line? ";
    int line;
    std::cin >> line;
    if (std::cin.fail() || line < 0 || line >= (int) m_contents->size()) {
        std::cout << "Not a valid line number!\n";
        std::cin.clear();
        std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
        return 1;
    }

    return prepend_before_line(line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x455d(%rip), %rdi      # 0x6fd0
leaq 0x1682(%rip), %rsi      # 0x40fc
callq 0x2150
movq 0x455a(%rip), %rbx      # 0x6fe0
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
setne %al
movl (%r15), %esi
testl %esi, %esi
sets %cl
orb %al, %cl
jne 0x2acf
movq (%r14), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x5, %rcx
cmpl %ecx, %esi
jge 0x2acf
movq %r14, %rdi
callq 0x2eba
xorl %eax, %eax
jmp 0x2b0b
movq 0x44fa(%rip), %rdi      # 0x6fd0
leaq 0x156f(%rip), %rsi      # 0x404c
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2290
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
pushq $0xa
popq %rdx
movq %rbx, %rdi
callq 0x20e0
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::swap_lines_command()
int Editor::swap_lines_command() {

    std::cout << "First line to swap? ";
    int first;
    std::cin >> first;
    if (std::cin.fail() || first < 0 || first >= (int) m_contents->size()) {
        std::cout << "Not a valid line number!\n";
        std::cin.clear();
        std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
        return 1;
    }

    std::cout << "Second line to swap? ";
    int second;
    std::cin >> second;
    if (std::cin.fail() || second < 0 || second >= (int) m_contents->size()) {
        std::cout << "Not a valid line number!\n";
        std::cin.clear();
        std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
        return 1;
    }

    return swap_lines(first, second);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x44a7(%rip), %rdi      # 0x6fd0
leaq 0x15e8(%rip), %rsi      # 0x4118
callq 0x2150
movq 0x44a4(%rip), %rbx      # 0x6fe0
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
setne %cl
movl (%r15), %eax
testl %eax, %eax
sets %dl
orb %cl, %dl
jne 0x2bd9
movq (%r14), %rcx
movq 0x8(%rcx), %rdx
subq (%rcx), %rdx
shrq $0x5, %rdx
cmpl %edx, %eax
jge 0x2bd9
movq 0x4450(%rip), %rdi      # 0x6fd0
leaq 0x15a6(%rip), %rsi      # 0x412d
callq 0x2150
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20d0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
setne %al
movl (%r15), %edx
testl %edx, %edx
sets %cl
orb %al, %cl
jne 0x2bd9
movq (%r14), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x5, %rcx
cmpl %ecx, %edx
jge 0x2bd9
movl 0x8(%rsp), %esi
movq %r14, %rdi
callq 0x2f3a
xorl %eax, %eax
jmp 0x2c15
movq 0x43f0(%rip), %rdi      # 0x6fd0
leaq 0x1465(%rip), %rsi      # 0x404c
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2290
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
pushq $0xa
popq %rdx
movq %rbx, %rdi
callq 0x20e0
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::edit_line(int)
int Editor::edit_line(int line) {

    if (line >= (int) m_contents->size()) {
        m_contents->resize(line + 1, "");
    }

    std::cout << "> ";
    std::string input;

    std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
    std::getline(std::cin, input);
    std::cin.clear();
    (*m_contents)[line] = input;

    move_to_line(line);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %r15
movq 0x8(%r15), %rax
subq (%r15), %rax
shrq $0x5, %rax
cmpl %esi, %eax
jg 0x2c73
leaq 0x141e(%rip), %rsi      # 0x4065
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2ff4
leal 0x1(%rbx), %eax
movslq %eax, %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x3052
leaq 0x10(%rsp), %rdi
callq 0x2090
movq 0x4356(%rip), %rdi      # 0x6fd0
leaq 0x13b6(%rip), %rsi      # 0x4037
callq 0x2150
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x4342(%rip), %rdi      # 0x6fe0
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
pushq $0xa
popq %rdx
callq 0x20e0
movq 0x4329(%rip), %r15      # 0x6fe0
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x2030
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x2290
movq (%r14), %rax
movslq %ebx, %rdi
shlq $0x5, %rdi
addq (%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x20c0
movl %ebx, 0x28(%r14)
leaq 0x10(%rsp), %rdi
callq 0x2090
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2d0d
movq %rax, %rbx
jmp 0x2d1a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::write()
int Editor::write() {
    std::ofstream file;
    file.open(m_filename);
    if (file.fail()) {
        std::cout << "Can't open file " << m_filename << " for writing!";
        return 1;
    }

    for (int i = 0; i < (int) m_contents->size(); i++) {
        file << m_contents->at(i) << '\n';
    }

    file.close();
    
    return 0;   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x22a0
leaq 0x8(%rbx), %r14
pushq $0x10
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x20a0
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x2d99
movq 0x4262(%rip), %rdi      # 0x6fd0
leaq 0x131c(%rip), %rsi      # 0x4091
callq 0x2150
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
leaq 0x1316(%rip), %rsi      # 0x40a2
movq %rax, %rdi
callq 0x2150
pushq $0x1
popq %rbx
jmp 0x2de7
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
pushq $0xa
popq %rbp
movq (%rbx), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
shrq $0x5, %rax
cltq
cmpq %rax, %r14
jge 0x2ddb
movq %r14, %rsi
callq 0x3030
movq %r15, %rdi
movq %rax, %rsi
callq 0x2140
movq %rax, %rdi
movl %ebp, %esi
callq 0x21a0
incq %r14
jmp 0x2da4
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x2210
leaq 0x8(%rsp), %rdi
callq 0x2240
movl %ebx, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e03
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/editor.cpp
// Function: Editor::swap_lines(int, int)
int Editor::swap_lines(int first, int second) {
    std::string first_str = m_contents->at(first);
    std::string second_str = m_contents->at(second);

    (*m_contents)[first] = second_str;
    (*m_contents)[second] = first_str;

    move_to_line(first);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rdi
movslq %esi, %r12
movq %r12, %rsi
callq 0x3030
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x21f0
movq (%r14), %rdi
movslq %ebp, %r15
movq %r15, %rsi
callq 0x3030
movq %rsp, %rdi
movq %rax, %rsi
callq 0x21f0
movq (%r14), %rax
shlq $0x5, %r12
addq (%rax), %r12
movq %rsp, %rsi
movq %r12, %rdi
callq 0x20c0
movq (%r14), %rax
shlq $0x5, %r15
addq (%rax), %r15
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x20c0
movl %ebx, 0x28(%r14)
movq %rsp, %rdi
callq 0x2090
leaq 0x20(%rsp), %rdi
callq 0x2090
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2090
jmp 0x2fe2
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/main.cpp
// Function: read_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<std::string>* read_file(const std::string& filename) {
    std::ifstream file(filename);

    if (file.fail())
        return nullptr;

    std::string str;
    std::vector<std::string>* file_contents = new std::vector<std::string>();
    while (std::getline(file, str)) {
        file_contents->push_back(str);
    }
    
    return file_contents;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rdi, %rsi
leaq 0x28(%rsp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rsp,%rax)
je 0x37c9
xorl %ebx, %ebx
jmp 0x382a
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
pushq $0x18
popq %rdi
callq 0x2160
movq %rax, %rbx
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3820
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3930
jmp 0x37fa
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x28(%rsp), %rdi
callq 0x2040
movq %rbx, %rax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3846
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x28(%rsp), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/main.cpp
// Function: main
int main(int argc, char** argv) {
    if (argc < 2) {
        std::cout << "Please provide a file path.\n";
        return 1;
    }

    std::string filepath(argv[1]);
    std::vector<std::string>* contents = read_file(filepath);
    if (contents == nullptr) {
        std::cout << "Error reading file.\n";
        return 1;
    }

    Editor editor(contents, filepath);
    editor.run_editor();

    delete contents;

    return 0;
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
cmpl $0x1, %edi
jg 0x3887
movq 0x375a(%rip), %rdi      # 0x6fd0
leaq 0x96b(%rip), %rsi       # 0x41e8
callq 0x2150
pushq $0x1
popq %rbx
jmp 0x3904
movq 0x8(%rsi), %rsi
movq %rsp, %rbx
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x2ff4
movq %rbx, %rdi
callq 0x3798
movq %rax, %rbx
testq %rax, %rax
je 0x38e6
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x245c
leaq 0x20(%rsp), %rdi
callq 0x248a
movq %rbx, %rdi
callq 0x395c
pushq $0x18
popq %rsi
movq %rbx, %rdi
callq 0x2170
leaq 0x28(%rsp), %rdi
callq 0x2090
xorl %ebx, %ebx
jmp 0x38fc
movq 0x36e3(%rip), %rdi      # 0x6fd0
leaq 0x911(%rip), %rsi       # 0x4205
callq 0x2150
pushq $0x1
popq %rbx
movq %rsp, %rdi
callq 0x2090
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2090
jmp 0x3920
jmp 0x391d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/jantuomi[P]me/utils.cpp
// Function: Utils::getch()
char Utils::getch(){
    char buf=0;
    struct termios old={0};
    fflush(stdout);
    if(tcgetattr(0, &old)<0)
        perror("tcsetattr()");
    old.c_lflag&=~ICANON;
    old.c_lflag&=~ECHO;
    old.c_cc[VMIN]=1;
    old.c_cc[VTIME]=0;
    if(tcsetattr(0, TCSANOW, &old)<0)
        perror("tcsetattr ICANON");
    if(read(0,&buf,1)<0)
        perror("read()");
    old.c_lflag|=ICANON;
    old.c_lflag|=ECHO;
    if(tcsetattr(0, TCSADRAIN, &old)<0)
        perror ("tcsetattr ~ICANON");
    //printf("%c\n",buf);
    return buf;
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
movb $0x0, 0xf(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movups %xmm0, 0x2c(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movq 0x34ec(%rip), %rax      # 0x6fb8
movq (%rax), %rdi
callq 0x21b0
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2180
testl %eax, %eax
js 0x3b33
leaq 0x10(%rsp), %rdx
andb $-0xb, 0xc(%rdx)
movw $0x100, 0x16(%rdx)      # imm = 0x100
xorl %edi, %edi
xorl %esi, %esi
callq 0x21d0
testl %eax, %eax
js 0x3b41
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
xorl %edi, %edi
callq 0x2220
testq %rax, %rax
js 0x3b4f
leaq 0x10(%rsp), %rdx
orb $0xa, 0xc(%rdx)
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x21d0
testl %eax, %eax
js 0x3b5d
movb 0xf(%rsp), %al
addq $0x50, %rsp
popq %rbx
retq
leaq 0x6e0(%rip), %rdi       # 0x421a
callq 0x2120
jmp 0x3ae2
leaq 0x6de(%rip), %rdi       # 0x4226
callq 0x2120
jmp 0x3afe
leaq 0x6e1(%rip), %rdi       # 0x4237
callq 0x2120
jmp 0x3b12
leaq 0x6da(%rip), %rdi       # 0x423e
callq 0x2120
jmp 0x3b29
// File: /workspace/github_cpp_makefile_star2_O2/manpat[P]iterator_trait/./iterator_trait/iterator.h
// Function: StdFwdIteratorConsumer<InputIteratorAdaptor<int*, int*>>::operator++()
StdFwdIteratorConsumer& operator++() {
		m_item = m_iter.unwrap_ref().next();
		if (!m_item.is_some())
			m_iter = None;

		return *this;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1a7c
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x1a8c
movb 0x4(%r14), %al
movb %al, 0x1c(%rbx)
cmpb $0x1, %al
jne 0x19a5
movl (%rsp), %eax
movl %eax, 0x18(%rbx)
jmp 0x19a9
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq