LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../dataframe/../store/../utils/queue.h
// Function: Queue::Queue(char*)
Queue(char* serialized) {
    this->head_ = nullptr;
    this->tail_ = nullptr;
    this->size_ = 0;
    Deserializable* ds = new Deserializable();
    char* payload = JSONHelper::getPayloadValue(serialized)->c_str();
    size_t queueLen = std::stoi(JSONHelper::getValueFromKey("size_", payload)->c_str());
    char* vals = JSONHelper::getValueFromKey("queueObjs_", payload)->c_str();
    for(int i = 0; i < queueLen; i++) {
        char* serial = JSONHelper::getArrayValueAt(vals, i)->c_str();
        Object* o = ds->deserialize(serial);
        add(o);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x8(%rdi)
leaq 0x10c97(%rip), %rcx     # 0x278e0
movq %rcx, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rax, 0x20(%rdi)
movq %rsi, %rdi
callq 0xc82c
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
leaq 0x6750(%rip), %rdi      # 0x1d3bf
movq %rax, -0x38(%rbp)
movq %rax, %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
leaq -0x60(%rbp), %r14
leaq -0x29(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x70e0
movq (%r14), %r13
callq 0x7040
movq %rax, %r12
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl $0x0, (%r12)
leaq -0x40(%rbp), %r15
movq %r13, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x72f0
cmpq %r13, (%r15)
je 0x16d67
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0x16d73
movl (%r12), %eax
cmpl $0x22, %eax
je 0x16d73
testl %eax, %eax
jne 0x16cf3
movl -0x30(%rbp), %eax
movl %eax, (%r12)
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16d05
callq 0x7200
leaq 0x66b9(%rip), %rdi      # 0x1d3c5
movq -0x38(%rbp), %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
testl %r14d, %r14d
je 0x16d58
movq %rax, %r15
xorl %r12d, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0xcd78
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %rsi
callq 0x146f0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xac06
incl %r12d
cmpl %r12d, %r14d
jne 0x16d29
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6391(%rip), %rdi      # 0x1d0ff
callq 0x7140
leaq 0x6385(%rip), %rdi      # 0x1d0ff
callq 0x7310
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x16d90
movl -0x30(%rbp), %eax
movl %eax, (%r12)
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16da2
callq 0x7200
movq %rbx, %rdi
callq 0x73b0
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../dataframe/../store/../utils/keyVal.h
// Function: KeyVal::deserialize(char*)
static KeyVal* deserialize(char* s) {
        Deserializable* ds = new Deserializable();
        char* key_serialized = JSONHelper::getValueFromKey("key_", s)->c_str();
        Object* key = ds->deserialize(key_serialized);
        Object* val = ds->deserialize(JSONHelper::getValueFromKey("val_", s)->c_str());
        KeyVal* kv = new KeyVal(key, val);
        return kv;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x64a2(%rip), %rdi      # 0x1d3f3
movq %rbx, %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %rsi
callq 0x146f0
movq %rax, %r14
leaq 0x6484(%rip), %rdi      # 0x1d3f8
movq %rbx, %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %rsi
callq 0x146f0
movq %rax, %rbx
movl $0x20, %edi
callq 0x7230
movq $0x0, 0x8(%rax)
leaq 0x109b7(%rip), %rcx     # 0x27960
movq %rcx, (%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../network/../store/value.h
// Function: Value::Value(char*)
Value(char* serialized) {
        Deserializable* ds = new Deserializable();
        char* payload = JSONHelper::getPayloadValue(serialized)->c_str();
        char* serialData = JSONHelper::getValueFromKey("data", payload)->c_str();
        this->data = serialData;
        if(JSONHelper::isObject(serialData)) {
            this->data = ds->deserialize(JSONHelper::getValueFromKey("data", payload)->c_str())->serialize();
        } else {
            this->data = serialData;
        }
        this->length = std::stoi(JSONHelper::getValueFromKey("length", payload)->c_str());
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
leaq 0x10d2b(%rip), %rax     # 0x27d08
movq %rax, (%rdi)
movq %rsi, %rdi
callq 0xc82c
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %r14
leaq 0x6598(%rip), %rdi      # 0x1d593
movq %rax, %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %r15
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0xcb5c
testb %al, %al
je 0x1704b
leaq 0x656d(%rip), %rdi      # 0x1d593
movq %r14, %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %rsi
callq 0x146f0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x38(%rcx)
movq %rax, %r15
movq %r15, 0x10(%rbx)
leaq 0x6542(%rip), %rdi      # 0x1d598
movq %r14, %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
leaq -0x58(%rbp), %r14
leaq -0x29(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x70e0
movq (%r14), %r15
callq 0x7040
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
leaq -0x38(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x72f0
cmpq %r15, (%r12)
je 0x170e4
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x170f0
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x170f0
testl %ecx, %ecx
jne 0x170bf
movl %r13d, (%r14)
movq %rax, 0x18(%rbx)
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x170d5
callq 0x7200
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6014(%rip), %rdi      # 0x1d0ff
callq 0x7140
leaq 0x6008(%rip), %rdi      # 0x1d0ff
callq 0x7310
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x17108
movl %r13d, (%r14)
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1711a
callq 0x7200
movq %rbx, %rdi
callq 0x73b0
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../dataframe/distributedDataframe.h
// Function: DistributedDataFrame::DistributedDataFrame(char*, KVStore*)
DistributedDataFrame(char* serialized, KVStore* kv) {
      Deserializable* d = new Deserializable();
      char* payload = JSONHelper::getPayloadValue(serialized)->c_str();
      Schema* sch = new Schema(JSONHelper::getValueFromKey("schema_", payload)->c_str());
      Array* cols = new Array(JSONHelper::getValueFromKey("cols_", payload)->c_str(), kv);
      this->kv_ = kv;
      this->schema_ = sch;
      this->cols_ = cols;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
leaq 0xc795(%rip), %rax      # 0x27ed8
movq %rax, (%rdi)
movq %rsi, %rdi
callq 0xc82c
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %r12
movl $0x50, %edi
callq 0x7230
movq %rax, %r15
leaq 0x2132(%rip), %rdi      # 0x1d8a0
movq %r12, %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %r15, %rdi
movq %rax, %rsi
callq 0x16354
movl $0x28, %edi
callq 0x7230
movq %rax, %r13
leaq 0x210a(%rip), %rdi      # 0x1d8a8
movq %r12, %rsi
callq 0xc9a6
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %r13, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x19a2a
movq %r14, 0x20(%rbx)
movq %r15, 0x10(%rbx)
movq %r13, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r13, %r15
jmp 0x1b7e3
movq %rax, %rbx
movq %r15, %rdi
callq 0x7200
movq %rbx, %rdi
callq 0x73b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../dataframe/dataframe.h
// Function: DataFrame::equals(Object*)
bool equals(Object  * other) {
      if (other == this) return true;
        DataFrame* x = dynamic_cast<DataFrame*>(other);
        if (x == nullptr) return false;
        if (this->ncols() != x->ncols()) return false;
        if (this->nrows() != x->nrows()) return false;
        for (size_t i = 0; i < this->ncols(); i++) {
            if (!(this->cols_->get(i)->equals(x->cols_->get(i)))) { 
                return false; 
            }
        }
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb $0x1, %r14b
cmpq %rdi, %rsi
je 0x1c332
testq %rsi, %rsi
je 0x1c32f
movq %rdi, %rbx
leaq 0xb020(%rip), %rax      # 0x272d0
leaq 0xc981(%rip), %rdx      # 0x28c38
movq %rsi, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x7280
testq %rax, %rax
je 0x1c32f
movq %rax, %r15
movq 0x10(%rbx), %rcx
movq 0x20(%rcx), %rax
movq 0x10(%r15), %rdx
cmpq 0x20(%rdx), %rax
jne 0x1c32f
movq 0x28(%rcx), %rcx
cmpq 0x28(%rdx), %rcx
jne 0x1c32f
testq %rax, %rax
je 0x1c332
xorl %r12d, %r12d
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x40(%rax)
movq %rax, %r14
movq 0x18(%r15), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x40(%rax)
movq (%r14), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq *0x18(%rcx)
movl %eax, %r14d
testb %al, %al
je 0x1c332
incq %r12
movq 0x10(%rbx), %rax
cmpq 0x20(%rax), %r12
jb 0x1c2f0
jmp 0x1c332
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../dataframe/dataframe.h
// Function: DataFrame::serialize()
char* serialize() {
        Serializable* sb = new Serializable();
        sb->initSerialize("DataFrame");
        char * serializedschema = schema_->serialize();
        sb->write("schema_", serializedschema);
        char * seralizedcols = cols_->serialize();
        sb->write("cols_", seralizedcols);
        sb->endSerialize();
        char* value = sb->get();
        delete sb;
        return value;
     }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x8, %edi
callq 0x7230
movq %rax, %rbx
movq %rax, %rdi
callq 0x8094
leaq 0x1532(%rip), %rsi      # 0x1d896
movq %rbx, %rdi
callq 0x80f6
movq 0x10(%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
leaq 0x1523(%rip), %rsi      # 0x1d8a0
movq %rbx, %rdi
movq %rax, %rdx
callq 0x8556
movq 0x18(%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
leaq 0x150f(%rip), %rsi      # 0x1d8a8
movq %rbx, %rdi
movq %rax, %rdx
callq 0x8556
movq (%rbx), %r14
movl $0x4, %esi
movq %r14, %rdi
callq 0x824a
movq 0x10(%r14), %rax
movq 0x20(%r14), %rcx
movl $0x7d207d20, (%rax,%rcx) # imm = 0x7D207D20
addq $0x4, 0x20(%r14)
movq (%rbx), %rdi
callq 0x82ba
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1c3ea
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x7200
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x7200
movq %r14, %rdi
callq 0x73b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../network/network.h
// Function: Status::serialize()
char* serialize() {
        Serializable* sb = new Serializable();
        sb->initSerialize("Status");
        sb->write("kind_", (int)kind_);
        sb->write("sender_", sender_);
        sb->write("target_", target_);
        sb->write("id_", id_);
        sb->write("status_msg_", status_msg_);
        sb->endSerialize();
        char* value = sb->get();
        delete sb;
        return value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x8, %edi
callq 0x7230
movq %rax, %rbx
movq %rax, %rdi
callq 0x8094
leaq 0x19d4(%rip), %rsi      # 0x1df00
movq %rbx, %rdi
callq 0x80f6
movl 0x10(%r14), %edx
leaq 0xd37(%rip), %rsi       # 0x1d276
movq %rbx, %rdi
callq 0x8162
movq 0x18(%r14), %rdx
leaq 0xd2a(%rip), %rsi       # 0x1d27c
movq %rbx, %rdi
callq 0x81d0
movq 0x20(%r14), %rdx
leaq 0xd1f(%rip), %rsi       # 0x1d284
movq %rbx, %rdi
callq 0x81d0
movq 0x28(%r14), %rdx
leaq 0x104a(%rip), %rsi      # 0x1d5c2
movq %rbx, %rdi
callq 0x81d0
movq 0x30(%r14), %rdx
leaq 0x19f6(%rip), %rsi      # 0x1df81
movq %rbx, %rdi
callq 0x8556
movq (%rbx), %r14
movl $0x4, %esi
movq %r14, %rdi
callq 0x824a
movq 0x10(%r14), %rax
movq 0x20(%r14), %rcx
movl $0x7d207d20, (%rax,%rcx) # imm = 0x7D207D20
addq $0x4, 0x20(%r14)
movq (%rbx), %rdi
callq 0x82ba
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1c5d9
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x7200
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x7200
movq %r14, %rdi
callq 0x73b0
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/jsonHelper.h
// Function: JSONHelper::arrayLen(char*)
static int arrayLen(char* s) {
        int len = strlen( s );
        bool valuesFound = false;
        char objStart = '{';
        char objEnd = '}';
        int count = 0;
        int startCharDepth = -1;
        //pull the top level object-value from the serialzed string
        for (int i = 0; i < len; i++){
            char temp = s[i];
            if(!valuesFound) {
                //the three ways a payload in our JSON can start, will rely on this to know what character closes the value
                //also keeps track of depth if there are nested objects
                if(temp == '{' || temp == '[' || temp == '\'') {
                    objStart = temp;
                    startCharDepth = 1;
                    valuesFound = true;
                    if(temp == '{') {
                        objEnd = '}';
                    } else if(temp == '[') {
                        objEnd = ']';
                    } else if(temp == '\'') {
                        objEnd = '\'';
                        startCharDepth = 0;
                    }   
                }
            } else if(temp == objStart) {
                startCharDepth++;
            } 
            if(temp == objEnd && valuesFound) {
                if(temp != objStart) {
                    startCharDepth--;
                }
                //if we've reached the final level of end character, break out of loop
                if(startCharDepth <= 0  || (temp == objStart && startCharDepth % 2 == 0)) {
                    count++;
                }
            }
        }
        return count;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x7100
testl %eax, %eax
jle 0x1c6bc
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movb $0x7b, %dil
movb $0x7d, %sil
xorl %edx, %edx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
xorl %ecx, %ecx
movb (%rbx,%rdx), %r11b
testb $0x1, %r8b
je 0x1c649
xorl %r10d, %r10d
cmpb %dil, %r11b
sete %r10b
addl %r10d, %r9d
cmpb %sil, %r11b
jne 0x1c66a
jmp 0x1c686
movzbl %r11b, %r14d
cmpl $0x27, %r14d
je 0x1c67a
movl $0x1, %r10d
cmpl $0x7b, %r14d
je 0x1c66f
cmpl $0x5b, %r14d
jne 0x1c66a
movb $0x5d, %sil
jmp 0x1c672
movl %r9d, %r10d
jmp 0x1c6ab
movb $0x7d, %sil
movb $0x1, %r8b
movl %r11d, %edi
jmp 0x1c6ab
xorl %r9d, %r9d
movl %r11d, %edi
movl %r11d, %esi
movb $0x1, %r8b
xorl %r14d, %r14d
cmpb %dil, %r11b
setne %r14b
movl %r9d, %r10d
subl %r14d, %r10d
testl %r10d, %r10d
jle 0x1c6a9
cmpb %dil, %r11b
jne 0x1c6ab
movl %r10d, %r9d
andl $0x1, %r9d
jne 0x1c6ab
incl %ecx
incq %rdx
movl %r10d, %r9d
cmpq %rdx, %rax
jne 0x1c62b
jmp 0x1c6be
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../network/network.h
// Function: Directory::serialize()
char* serialize() {
        Serializable* sb = new Serializable();
        sb->initSerialize("Directory");
        sb->write("kind_", (int)kind_);
        sb->write("sender_", sender_);
        sb->write("target_", target_);
        sb->write("id_", id_);
        sb->write("ports", ports, clients);
        sb->write("clients", clients);
        sb->write("addresses", addresses, clients);
        sb->endSerialize();
        char* value = sb->get();
        delete sb;
        return value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x8, %edi
callq 0x7230
movq %rax, %rbx
movq %rax, %rdi
callq 0x8094
leaq 0x1811(%rip), %rsi      # 0x1df07
movq %rbx, %rdi
callq 0x80f6
movl 0x10(%r14), %edx
leaq 0xb6d(%rip), %rsi       # 0x1d276
movq %rbx, %rdi
callq 0x8162
movq 0x18(%r14), %rdx
leaq 0xb60(%rip), %rsi       # 0x1d27c
movq %rbx, %rdi
callq 0x81d0
movq 0x20(%r14), %rdx
leaq 0xb55(%rip), %rsi       # 0x1d284
movq %rbx, %rdi
callq 0x81d0
movq 0x28(%r14), %rdx
leaq 0xe80(%rip), %rsi       # 0x1d5c2
movq %rbx, %rdi
callq 0x81d0
movq 0x38(%r14), %rdx
movl 0x30(%r14), %ecx
leaq 0x183c(%rip), %rsi      # 0x1df95
movq %rbx, %rdi
callq 0x1c7f4
movq 0x30(%r14), %rdx
leaq 0x1821(%rip), %rsi      # 0x1df8d
movq %rbx, %rdi
callq 0x81d0
movq 0x40(%r14), %rdx
movl 0x30(%r14), %ecx
leaq 0x1818(%rip), %rsi      # 0x1df9b
movq %rbx, %rdi
callq 0xf816
movq (%rbx), %r14
movl $0x4, %esi
movq %r14, %rdi
callq 0x824a
movq 0x10(%r14), %rax
movq 0x20(%r14), %rcx
movl $0x7d207d20, (%rax,%rcx) # imm = 0x7D207D20
addq $0x4, 0x20(%r14)
movq (%rbx), %rdi
callq 0x82ba
movq (%rax), %rcx
movq %rax, %rdi
callq *0x30(%rcx)
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1c7d1
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x7200
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x7200
movq %r14, %rdi
callq 0x73b0
// File: /workspace/github_cpp_makefile_star2_O3/yasz24[P]eau2/src/network/../serialize/../network/../serialize/serial.h
// Function: Serializable::write(char const*, unsigned long*, int)
void write(const char* name, size_t* val, int len) {
        char str[1000];
        sprintf(str, "'%s' : [ ", name);
        buff->c(str);
        for(int i = 0; i < len; i++) {
            sprintf(str, "'%zu',", val[i]);
            buff->c(str);
        }
        buff->c("], ");
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movl %ecx, %r14d
movq %rdx, -0x38(%rbp)
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0xb59(%rip), %rsi       # 0x1d375
leaq -0x420(%rbp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x7080
movq %rbx, -0x30(%rbp)
movq (%rbx), %r13
movq %r12, %rdi
callq 0x7100
movq %rax, %r15
movq %r13, %rdi
movq %rax, %rsi
callq 0x824a
movq 0x10(%r13), %rdi
addq 0x20(%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x71a0
addq %r15, 0x20(%r13)
testl %r14d, %r14d
jle 0x1c8c1
movl %r14d, %ebx
xorl %r14d, %r14d
movq -0x38(%rbp), %rax
movq (%rax,%r14,8), %rdx
movq %r12, %rdi
leaq 0x1727(%rip), %rsi      # 0x1dfa5
xorl %eax, %eax
callq 0x7080
movq -0x30(%rbp), %rax
movq (%rax), %r13
movq %r12, %rdi
callq 0x7100
movq %rax, %r15
movq %r13, %rdi
movq %rax, %rsi
callq 0x824a
movq 0x10(%r13), %rdi
addq 0x20(%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x71a0
addq %r15, 0x20(%r13)
incq %r14
cmpq %r14, %rbx
jne 0x1c86c
movq -0x30(%rbp), %rax
movq (%rax), %rbx
movl $0x3, %esi
movq %rbx, %rdi
callq 0x824a
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
movb $0x20, 0x2(%rax,%rcx)
movw $0x2c5d, (%rax,%rcx)    # imm = 0x2C5D
addq $0x3, 0x20(%rbx)
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/src/vector_list/bench.cpp
// Function: void bench_all<Trivial<8>, Trivial<32>, Trivial<128>, Trivial<1024>, Trivial<4096>, NonTrivialStringMovable, NonTrivialStringMovableNoExcept, NonTrivialArray<32>>()
void bench_all(){
    bench_types<bench_fill_back,        Types...>();
    bench_types<bench_emplace_back,     Types...>();
    bench_types<bench_fill_front,       Types...>();
    bench_types<bench_emplace_front,    Types...>();
    bench_types<bench_linear_search,    Types...>();
    bench_types<bench_random_insert,    Types...>();
    bench_types<bench_random_remove,    Types...>();
    bench_types<bench_sort,             Types...>();
    bench_types<bench_destruction,      Types...>();

    // it is really slow so run only for limited set of data
    bench_types<bench_number_crunching, TrivialSmall, TrivialMedium>();
}

// Assembly:
pushq %rax
callq 0x58a2
callq 0x5b16
callq 0x124ae
callq 0x12642
callq 0x173c2
callq 0x17556
callq 0x1aabc
callq 0x1ac50
callq 0x1e10c
callq 0x1e2a0
callq 0x290fa
callq 0x2928e
callq 0x350b4
callq 0x35280
callq 0x3de02
callq 0x3df96
callq 0x51b5a
callq 0x51cee
callq 0x56c94
popq %rax
jmp 0x57d44
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/Node.cpp
// Function: Node::set_cardinal(char, Node&)
void Node::set_cardinal(char cardinal_dir, Node& n)
{
	switch (cardinal_dir)
	{
		case 'n':
			nord = &n;
			break;

      case 's':
			sud = &n;
			break;

      case 'e':
			est = &n;
			break;

		case 'o':
			ovest = &n;
			break;
	}
}

// Assembly:
cmpl $0x6e, %esi
jg 0x2e23
cmpl $0x65, %esi
je 0x2e34
cmpl $0x6e, %esi
je 0x2e3e
jmp 0x2e33
cmpl $0x6f, %esi
je 0x2e3a
cmpl $0x73, %esi
jne 0x2e33
addq $0x8, %rdi
jmp 0x2e3e
retq
addq $0x10, %rdi
jmp 0x2e3e
addq $0x18, %rdi
pushq %rbp
movq %rsp, %rbp
movq %rdx, (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/Map.cpp
// Function: IntToString[abi:cxx11](int)
std::string IntToString (int num)
{
  std::ostringstream oss;

  // Funziona come un cout
  oss << num;

  // ritrna la stringa
  return oss.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x190(%rbp), %r15
movq %r15, %rdi
callq 0x21a0
movq %r15, %rdi
movl %r14d, %esi
callq 0x2200
leaq -0x188(%rbp), %rsi
movq %rbx, %rdi
callq 0x21e0
movq 0xec16(%rip), %rsi      # 0x11fc8
leaq -0x190(%rbp), %rdi
callq 0x2070
leaq -0x120(%rbp), %rdi
callq 0x2060
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xebe3(%rip), %rsi      # 0x11fc8
leaq -0x190(%rbp), %rdi
callq 0x2070
leaq -0x120(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2210
nop
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/Map.cpp
// Function: Map::draw_search()
void Map::draw_search()
{
  // Crea due puntatori che iterano per la matrice
  listaY* ordi = origin;
  listaX* asci;

  while(ordi != NULL)
  {
    asci = ordi->h;

    while(asci != NULL)
    {
      // in base al valore nella ascissa disegna cose diverse
      std::cout << asci->val;

      // scorre alla ascissa successiva
      asci = asci->next;
    }

    // Se il ciclo arriva qui, significa che ha finito una riga
    std::cout << "\n";
    ordi = ordi->down;    // passo alla riga successiva
  }

  //////////////////////////////////////////////
  //DEBUG STUFF
  std::cout << "Top left coordinate";
  std::cout << "(" << mostLeft << ", " << mostUp << ")\n";
  std::cout << "width = " << width << "\nheight = " << height << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r12
testq %r12, %r12
je 0x3612
movq 0xe9fa(%rip), %r14      # 0x11fd0
leaq 0xb278(%rip), %r15      # 0xe855
movq 0x8(%r12), %r13
testq %r13, %r13
je 0x35f9
movl 0x8(%r13), %esi
movq %r14, %rdi
callq 0x2200
movq (%r13), %r13
jmp 0x35e2
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2140
movq (%r12), %r12
testq %r12, %r12
jne 0x35dd
movq 0xe9b7(%rip), %r14      # 0x11fd0
leaq 0x6ac0(%rip), %rsi      # 0xa0e0
movl $0x13, %edx
movq %r14, %rdi
callq 0x2140
leaq 0x6ac0(%rip), %rsi      # 0xa0f4
movl $0x1, %edx
movq %r14, %rdi
callq 0x2140
movl 0x10(%rbx), %esi
movq %r14, %rdi
callq 0x2200
movq %rax, %r15
leaq 0x6aa0(%rip), %rsi      # 0xa0f6
movl $0x2, %edx
movq %rax, %rdi
callq 0x2140
movl 0x14(%rbx), %esi
movq %r15, %rdi
callq 0x2200
leaq 0x755d(%rip), %rsi      # 0xabd2
movl $0x2, %edx
movq %rax, %rdi
callq 0x2140
leaq 0x6a70(%rip), %rsi      # 0xa0f9
movl $0x8, %edx
movq %r14, %rdi
callq 0x2140
movl 0x8(%rbx), %esi
movq %r14, %rdi
callq 0x2200
movq %rax, %r14
leaq 0x6a57(%rip), %rsi      # 0xa102
movl $0xa, %edx
movq %rax, %rdi
callq 0x2140
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0x2200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/Map.cpp
// Function: Map::addLine(bool)
void Map::addLine(bool onTop)
{
   // aumento la altezza della mappa
   height++;

   // Crea una nuova riga
   listaY* newLine = new listaY;
   newLine->down = NULL;
   newLine->h = new listaX;
   newLine->h->next = NULL;
   newLine->h->val = 0;
   newLine->h->pres = 0;

   // Popolo la riga appena creata
   // i conta da 1 perchè un nodo lo ho gia' creato sopra
   for (int i = 1; i < width; i++)
   {
      // salva il vecchio nodo
      listaX* tmpx = newLine->h;

      // crea il nuovo nodo in testa
      newLine->h = new listaX;
      newLine->h->val = 0;
      newLine->h->pres = 0;
      newLine->h->next = tmpx;
   }

   // mette la riga creata in testa o in coda
   if (onTop)
   {
      // Aggiorna il valore mostUp
      mostUp++;

      // Se in testa
      listaY* tmpy = origin;

      origin = newLine;
      origin->down = tmpy;
   }
   else
   {
      // Se in coda
      listaY* iter = origin;

      while(iter->down != NULL) // scorro fino alla ultima riga
         iter = iter->down;

      iter->down = newLine;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
incl 0xc(%rdi)
movl $0x10, %edi
callq 0x2110
movq %rax, %rbx
movq $0x0, (%rax)
movl $0x18, %edi
callq 0x2110
movb $0x0, 0x10(%rax)
movq %rax, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl 0x8(%r14), %r12d
cmpl $0x2, %r12d
jl 0x3b1d
decl %r12d
movq %rax, %r13
movl $0x18, %edi
callq 0x2110
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, (%rax)
decl %r12d
jne 0x3af8
movq %rax, 0x8(%rbx)
testb %r15b, %r15b
je 0x3b31
incl 0x14(%r14)
movq (%r14), %rax
movq %rbx, (%r14)
movq %rax, (%rbx)
jmp 0x3b42
movq (%r14), %rax
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x3b34
movq %rbx, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/Hud.cpp
// Function: c_in_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
bool c_in_str(std::string s, char c)
{
   for (int i=0; i < s.size(); i++)
      if (s[i] == c)
         return true;

   return false;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x3c82
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movb $0x1, %al
cmpb %sil, (%rdx)
je 0x3c80
movl $0x1, %edi
movq %rdi, %rax
cmpq %rdi, %rcx
je 0x3c7a
leaq 0x1(%rax), %rdi
cmpb %sil, (%rdx,%rax)
jne 0x3c68
cmpq %rax, %rcx
seta %al
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/ClassPlayer.cpp
// Function: Player::diceRoll_or()
int Player::diceRoll_or() 
{
   srand(time(0));
   int roll = (rand()%20) +1;
   switch(roll)
   {
      case 1: case 2: case 3: case 4: case 5:
      // non succede niente
      return roll;

      // trovato scudo oro
      case 6:
         shield = "gold";
      return roll;

      // se scudo oro trovata pozione curativa
      // scudo argento altrimenti
      case 7: 
            hp += 8;
            return 71;
         
     case 8:   
            hp -=8;
            return 72;
   
      // se senza scudo trovo scudo bronzo
      // piccola arma altrimenti
      case 9: case 10: case 11: case 12:
         if (shield == "")
         {
            shield = "bronze";
            return 91;
         }
         else
         {
            atk += 1;
            return 92;
         }
      break;
   
      // trappola, danno incodizionato
      case 13: case 14: case 15: case 16: case 17:
         hp -= 4;
      return roll;
   
      // trovata spada argento
      case 18: case 19:
         atk+=4;
      return roll;

      // trovata spada magica
      case 20:
         hp += 5;
         atk += 5;
      return roll;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edi, %edi
callq 0x20e0
movl %eax, %edi
callq 0x20f0
callq 0x2040
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
movl %eax, %edx
subl %ecx, %edx
negl %ecx
addl %ecx, %eax
incl %eax
leaq 0x67ee(%rip), %rcx      # 0xe8c0
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
addl $-0x4, (%rbx)
jmp 0x8172
leaq 0x30(%rbx), %r14
leaq 0x6768(%rip), %rsi      # 0xe856
movq %r14, %rdi
callq 0x2050
testl %eax, %eax
je 0x810a
incl 0x4(%rbx)
movl $0x5c, %eax
jmp 0x8172
addl $0x4, 0x4(%rbx)
jmp 0x8172
movq 0x38(%rbx), %rdx
leaq 0x67fb(%rip), %rcx      # 0xe910
movl $0x6, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x21d0
movl $0x5b, %eax
jmp 0x8172
addl $0x5, (%rbx)
addl $0x5, 0x4(%rbx)
movl $0x14, %eax
jmp 0x8172
movq 0x38(%rbx), %rdx
addq $0x30, %rbx
leaq 0x67d5(%rip), %rcx      # 0xe91e
movl $0x4, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21d0
movl $0x6, %eax
jmp 0x8172
addl $0x8, (%rbx)
movl $0x47, %eax
jmp 0x8172
addl $-0x8, (%rbx)
movl $0x48, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/Menu.cpp
// Function: setPlayers()
int setPlayers()
{
	int  numberP = 0;
	while (numberP < 2)		//itero finche' il numero di giocatori e' <= a 2
	{
                for (int i=0; i<40; i++, std::cout<<"\n");				//spazio fra una schermata e l'altra
		stampaMenu("Quanti giocatori?","","[minimo 2 giocatori]","", 1);	//stampo il menu
		std::cin>> numberP;
               if(!std::cin){
                
                 std::cin.clear();
                 std::cin.ignore();
               }
	
	}
	
	return (numberP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
leaq -0x2c(%rbp), %rax
movl $0x0, (%rax)
xorl %r13d, %r13d
movq 0x8e90(%rip), %r14      # 0x11fd0
leaq 0x570e(%rip), %r15      # 0xe855
movq 0x8e92(%rip), %rbx      # 0x11fe0
incl %r13d
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2140
cmpl $0x28, %r13d
jne 0x914e
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0xb0(%rbp), %r13
movq %r13, %rdi
leaq 0x6074(%rip), %rsi      # 0xf1fa
leaq 0x607e(%rip), %rdx      # 0xf20b
callq 0x2d0e
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
leaq 0x56b1(%rip), %rdx      # 0xe856
movq %rdx, %rsi
callq 0x2d0e
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0x604c(%rip), %rsi      # 0xf20c
leaq 0x6059(%rip), %rdx      # 0xf220
callq 0x2d0e
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x90(%rbp), %r12
movq %r12, %rdi
leaq 0x566e(%rip), %rdx      # 0xe856
movq %rdx, %rsi
callq 0x2d0e
movq %r13, %rdi
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movq %r12, %rcx
movl $0x1, %r8d
callq 0x8178
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x9225
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x923e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9257
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x9279
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2120
movq %rbx, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2090
movq (%rbx), %rax
movq -0x18(%rax), %rdi
testb $0x5, 0x20(%rbx,%rdi)
je 0x92a5
addq %rbx, %rdi
xorl %esi, %esi
callq 0x21f0
movq %rbx, %rdi
callq 0x2230
movl -0x2c(%rbp), %eax
movl $0x0, %r13d
cmpl $0x2, %eax
jl 0x914e
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x9329
movq %rax, %rbx
jmp 0x9310
movq %rax, %rbx
jmp 0x92f7
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x92f7
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x9310
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9329
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x934b
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/Game.cpp
// Function: battleChoice()
bool battleChoice()
{
	std::string choice;

	std::cout<<"Vuoi combattere? [y/n]\n";
	std::cin>>choice;

	if (choice == "y") 
		return true;
	
	else if (choice == "n")
		return false;
	
	else
		return battleChoice();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq 0x8642(%rip), %rdi      # 0x11fd0
leaq 0x58f2(%rip), %rsi      # 0xf287
movl $0x17, %edx
callq 0x2140
movq 0x863a(%rip), %rdi      # 0x11fe0
leaq -0x30(%rbp), %rsi
callq 0x2180
leaq 0x58e9(%rip), %rsi      # 0xf29f
leaq -0x30(%rbp), %rdi
callq 0x2050
testl %eax, %eax
je 0x99e0
leaq 0x58d7(%rip), %rsi      # 0xf2a1
leaq -0x30(%rbp), %rdi
callq 0x2050
testl %eax, %eax
je 0x99e4
callq 0x9968
movl %eax, %ebx
jmp 0x99e6
movb $0x1, %bl
jmp 0x99e6
xorl %ebx, %ebx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x99fb
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2120
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x9a1e
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/giovifazi[P]knossos-bloodbath/Game.cpp
// Function: get_player_input(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
char get_player_input(std::string allowed)
{
   // Dichiarazione e inserimento della stringa di input
   std::string input;
   std::cin >> input;

   // finche l' input non è un comando valido notifica un errore
   while(!is_command(input, allowed))
   {
      std::cout << "Comando non valido, inserire solo un carattere valido!\n";
      std::cin >> input;
   }
   
   return input[0];  // ritorna il char del comando
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x8543(%rip), %rdi      # 0x11fe0
leaq -0x48(%rbp), %rsi
callq 0x2180
leaq -0x58(%rbp), %r12
leaq -0x78(%rbp), %r14
leaq -0x88(%rbp), %r15
movq %r12, -0x68(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x2c70
movq %r14, -0x88(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2c70
movq -0x80(%rbp), %rax
testl %eax, %eax
je 0x9b2a
xorl %r13d, %r13d
movq -0x88(%rbp), %rdi
testl %eax, %eax
jle 0x9b34
cmpq $0x1, -0x60(%rbp)
jne 0x9b34
movq -0x68(%rbp), %rcx
movb (%rcx), %cl
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
decq %rax
xorl %edx, %edx
cmpb (%rdi,%rdx), %cl
sete %r13b
je 0x9b34
leaq 0x1(%rdx), %rsi
cmpq %rdx, %rax
movq %rsi, %rdx
jne 0x9b13
jmp 0x9b34
movq -0x88(%rbp), %rdi
xorl %r13d, %r13d
cmpq %r14, %rdi
je 0x9b45
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2120
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x9b5a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2120
testb %r13b, %r13b
jne 0x9b8c
movl $0x37, %edx
movq 0x8465(%rip), %rdi      # 0x11fd0
leaq 0x5731(%rip), %rsi      # 0xf2a3
callq 0x2140
movq 0x8462(%rip), %rdi      # 0x11fe0
leaq -0x48(%rbp), %rsi
callq 0x2180
jmp 0x9ab5
movq -0x48(%rbp), %rdi
movb (%rdi), %bl
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9ba7
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2120
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9bd4
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x9bd7
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2120
jmp 0x9bd7
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9bf0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/WeihuaZhu[P]hpc_prog2/./io.h
// Function: rnorm(double, double)
double rnorm(double mu, double sigma)
{
    const double epsilon = std::numeric_limits<double>::min();
    const double two_pi = 2.0*3.14159265358979323846;

    static double z0, z1;
    static bool generate;
    generate = !generate;

    if (!generate)
        return z1 * sigma + mu;

    double u1, u2;
    do
    {
        u1 = rand() * (1.0 / RAND_MAX);
        u2 = rand() * (1.0 / RAND_MAX);
    }
    while ( u1 <= epsilon );

    z0 = sqrt(-2.0 * log(u1)) * cos(two_pi * u2);
    z1 = sqrt(-2.0 * log(u1)) * sin(two_pi * u2);
    return z0 * sigma + mu;
}

// Assembly:
subq $0x28, %rsp
movb 0x322fa(%rip), %al      # 0x395b0
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, 0x322ef(%rip)      # 0x395b0
testb %al, %al
je 0x72d1
leaq 0x322dc(%rip), %rax     # 0x395a8
jmp 0x73c9
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x20(%rsp)
callq 0x6140
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x21d17(%rip), %xmm0    # 0x29008
movsd %xmm0, (%rsp)
callq 0x6140
movsd (%rsp), %xmm0
movsd 0x21d08(%rip), %xmm1    # 0x29010
ucomisd %xmm0, %xmm1
jae 0x72dd
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x21ceb(%rip), %xmm1    # 0x29008
movsd %xmm1, 0x8(%rsp)
callq 0x63c0
mulsd 0x21ce8(%rip), %xmm0    # 0x29018
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7340
sqrtsd %xmm0, %xmm0
jmp 0x7345
callq 0x63a0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
mulsd 0x21cc7(%rip), %xmm0    # 0x29020
movsd %xmm0, 0x8(%rsp)
callq 0x6a70
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x3222e(%rip)    # 0x395a0
movsd (%rsp), %xmm0
callq 0x63c0
mulsd 0x21c94(%rip), %xmm0    # 0x29018
ucomisd 0x21c9c(%rip), %xmm0    # 0x29028
jb 0x7394
sqrtsd %xmm0, %xmm0
jmp 0x7399
callq 0x63a0
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x60f0
mulsd (%rsp), %xmm0
movsd %xmm0, 0x321f2(%rip)    # 0x395a8
leaq 0x321e3(%rip), %rax     # 0x395a0
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm0
mulsd (%rax), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/WeihuaZhu[P]hpc_prog2/./io.h
// Function: randn(int, double, double)
std::vector<double> randn(int n, double mu = 0.0, double sigma = 1.0)
{
    std::vector<double> x(n);
    for (int i = 0; i < n; ++i)
    {
        x[i] = rnorm(mu, sigma);
    }
    return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x7ea4
testl %r14d, %r14d
jle 0x7432
movl %ebp, %r14d
xorl %r15d, %r15d
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x72ac
movq (%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x7410
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/WeihuaZhu[P]hpc_prog2/./io.h
// Function: diag_dom_rand(int, double)
std::vector<double> diag_dom_rand(int n, double difficulty = .5)
{
    double sigma = 100.0;
    double mu = difficulty * sigma;
    std::vector<double> A = randn(n*n, mu, sigma);
    std::vector<double> abssums(n);
    // get max row absolute sum
    double abssum_max = 0.0;
    for (int i = 0; i < n; ++i)
    {
        double abssum = 0.0;
        for (int j = 0; j < n; ++j)
        {
            abssum += std::fabs(A[i*n+j]);
        }
        if (abssum > abssum_max)
            abssum_max = abssum;
    }
    // add abssum max to abs of diagonal
    for (int i = 0; i < n; ++i)
    {
        A[i*n+i] = std::fabs(A[i*n+i]) + abssum_max;
    }
    return A;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movsd 0x21bdb(%rip), %xmm1    # 0x29030
mulsd %xmm1, %xmm0
imull %esi, %esi
callq 0x73da
movslq %ebp, %rsi
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x7ea4
testl %ebp, %ebp
jle 0x74e7
movq (%rbx), %rcx
movl %ebp, %eax
leaq (,%rax,8), %rdx
xorpd %xmm2, %xmm2
xorl %esi, %esi
movapd 0x21bce(%rip), %xmm0    # 0x29060
xorl %edi, %edi
xorpd %xmm1, %xmm1
movsd (%rcx,%rdi,8), %xmm3
andpd %xmm0, %xmm3
addsd %xmm3, %xmm1
incq %rdi
cmpq %rdi, %rax
jne 0x7498
maxsd %xmm2, %xmm1
incq %rsi
addq %rdx, %rcx
movapd %xmm1, %xmm2
cmpq %rax, %rsi
jne 0x7492
testl %ebp, %ebp
jle 0x74e7
incl %ebp
movq (%rbx), %rcx
xorl %edx, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm2
andpd %xmm0, %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, (%rcx,%rdx,8)
addl %ebp, %edx
decq %rax
jne 0x74cb
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x74fe
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x64c0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7521
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x64c0
movq %r14, %rdi
callq 0x69a0
// File: /workspace/github_cpp_makefile_star2_O3/WeihuaZhu[P]hpc_prog2/mpi_tests.cpp
// Function: get_grid_comm(ompi_communicator_t**)
void get_grid_comm(MPI_Comm* grid_comm)
{
    // get comm size and rank
    int rank, p;
    MPI_Comm_size(MPI_COMM_WORLD, &p);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);

    int q = (int)sqrt(p);
    ASSERT_EQ(q*q, p) << "Number of processors must be a perfect square.";

    // split into grid communicator
    int dims[2] = {q, q};
    int periods[2] = {0, 0};
    MPI_Cart_create(MPI_COMM_WORLD, 2, dims, periods, 0, grid_comm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x31a53(%rip), %r14     # 0x38f90
leaq 0x1c(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x65e0
leaq 0x34(%rsp), %rsi
movq %r14, %rdi
callq 0x6790
cvtsi2sdl (%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x756f
sqrtsd %xmm0, %xmm0
jmp 0x7574
callq 0x63a0
cvttsd2si %xmm0, %ebp
movl %ebp, %eax
imull %ebp, %eax
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x21ae5(%rip), %rsi     # 0x29070
leaq 0x24a41(%rip), %rdx     # 0x2bfd3
leaq 0x20(%rsp), %r14
leaq 0x1c(%rsp), %r8
movq %r14, %rdi
callq 0x817d
cmpb $0x0, (%r14)
je 0x75e8
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x801c
leaq 0x20(%rsp), %rdx
movl %ebp, (%rdx)
movl %ebp, 0x4(%rdx)
leaq 0x8(%rsp), %rcx
movq $0x0, (%rcx)
movq 0x319bd(%rip), %rdi     # 0x38f90
movl $0x2, %esi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x60a0
jmp 0x7688
leaq 0x8(%rsp), %rdi
callq 0xaadc
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x21a72(%rip), %rsi     # 0x29074
movl $0x2e, %edx
callq 0x65a0
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x761b
movq (%rax), %r8
jmp 0x7622
leaq 0x23623(%rip), %r8      # 0x2ac45
leaq 0x21a7a(%rip), %rdx     # 0x290a3
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x27, %ecx
callq 0x8a02
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8a9e
leaq 0x10(%rsp), %rdi
callq 0x8a6e
cmpq $0x0, 0x8(%rsp)
je 0x767c
movl $0x1, %edi
callq 0x89ff
testb %al, %al
je 0x767c
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x767c
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x801c
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x76cc
jmp 0x76cc
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8a6e
jmp 0x76ab
jmp 0x76a8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7f32
jmp 0x76ba
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7f44
movq %rbx, %rdi
callq 0x69a0
movq %rax, %rdi
callq 0x7fdb
// File: /workspace/github_cpp_makefile_star2_O3/WeihuaZhu[P]hpc_prog2/mpi_tests.cpp
// Function: MpiTest_MatrixVectorMult1_Test::TestBody()
TEST(MpiTest, MatrixVectorMult1)
{
    // simple 4 by 4 input matrix
    double A[4*4] = {10., -1., 2., 0.,
                           -1., 11., -1., 3.,
                           2., -1., 10., -1.,
                           0.0, 3., -1., 8.};
    double x[4] =  {6., 25., -11., 15.};
    double y[4];
    double expected_y[4] = {13.,  325., -138.,  206.};
    int n = 4;

    // get grid communicator
    MPI_Comm grid_comm;
    get_grid_comm(&grid_comm);

    // testing sequential matrix multiplication
    mpi_matrix_vector_mult(n, A, x, y, grid_comm);

    // checking if all values are correct (up to some error value)
    for (int i = 0; i < n; ++i)
    {
        EXPECT_NEAR(expected_y[i], y[i], 1e-10) << " element y[" << i << "] is wrong";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
leaq 0x21b24(%rip), %rsi     # 0x29210
leaq 0x70(%rsp), %rbx
movl $0x10, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x21add(%rip), %xmm0    # 0x291e0
leaq 0x50(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps 0x21abc(%rip), %xmm0    # 0x291d0
movaps %xmm0, (%r14)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x7529
movq (%r15), %r8
leaq 0x30(%rsp), %rcx
movl $0x4, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x28068
leaq 0x21a6c(%rip), %r12     # 0x291b0
xorl %r14d, %r14d
leaq 0x2198b(%rip), %r13     # 0x290d9
leaq 0x10(%rsp), %rbp
leaq 0x8(%rsp), %rbx
leaq 0x20(%rsp), %r15
movsd (%r12), %xmm0
movsd 0x30(%rsp,%r14,8), %xmm1
movq %rbp, %rdi
leaq 0x21957(%rip), %rsi     # 0x290cb
leaq 0x21959(%rip), %rdx     # 0x290d4
movq %r13, %rcx
movsd 0x218b2(%rip), %xmm2    # 0x29038
callq 0xb27f
cmpb $0x0, 0x10(%rsp)
jne 0x7849
movq %rbx, %rdi
callq 0xaadc
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movl $0xb, %edx
leaq 0x2192c(%rip), %rsi     # 0x290df
callq 0x65a0
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movl %r14d, %esi
callq 0x6960
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movl $0xa, %edx
leaq 0x2190d(%rip), %rsi     # 0x290eb
callq 0x65a0
movq 0x18(%rsp), %rax
leaq 0x23456(%rip), %r8      # 0x2ac45
testq %rax, %rax
je 0x77f7
movq (%rax), %r8
movq %r15, %rdi
movl $0x1, %esi
leaq 0x2189d(%rip), %rdx     # 0x290a3
movl $0x46, %ecx
callq 0x8a02
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8a9e
movq %r15, %rdi
callq 0x8a6e
cmpq $0x0, 0x8(%rsp)
je 0x7849
movl $0x1, %edi
callq 0x89ff
testb %al, %al
je 0x7849
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7849
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x801c
incq %r14
addq $0x8, %r12
cmpq $0x4, %r14
jne 0x775d
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7890
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8a6e
jmp 0x789b
movq %rax, %rbx
jmp 0x78a5
jmp 0x7898
movq %rax, %rdi
callq 0x7fdb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7f32
leaq 0x10(%rsp), %rdi
callq 0x7f44
movq %rbx, %rdi
callq 0x69a0
nop