// File: geoherna[P]lib605/./src/lib605.cpp
// Function: lib605::MSR::GetModel[abi:cxx11]()
std::string MSR::GetModel(void) {
		if(!this->MSRConected) {
#if defined(DEBUG)
			std::cout << "[*] Error: unable to get model from non-connected device" << std::endl;
#endif
			return "ERROR";
		}
		char* model = new char[3];
		this->WriteAutoSize(MSR_REQ_MODEL);
		if(this->ReadBytes(model, 3) != 3) {
#if defined(DEBUG)
			std::cout << "[*] Error: unable to read model number, expected 3 bytes" << std::endl;
#endif
			return "ERROR";
		}
		if((memcmp((char*)model[0], MSR_ESC, 1) == 0) && model[2] == 'S') {
			model[0] = model[1];
			model[1] = '\0';
			std::string mdl(model);
			delete[] model;
			return mdl;
		}
		return "ERROR";
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
testb $0x1, 0x4(%rax)
jne 0x6947
leaq -0x11(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x57c0
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0x27fc(%rip), %rsi      # 0x9114
callq 0x5770
jmp 0x691f
leaq -0x11(%rbp), %rdi
callq 0x5490
jmp 0x6aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x5490
jmp 0x6ad7
movl $0x3, %edi
callq 0x5030
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
leaq 0x27ba(%rip), %rsi      # 0x911a
callq 0x5240
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x3, %edx
callq 0x5160
cmpl $0x3, %eax
je 0x69c7
leaq -0x31(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x57c0
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rdx
leaq 0x277c(%rip), %rsi      # 0x9114
callq 0x5770
jmp 0x699f
leaq -0x31(%rbp), %rdi
callq 0x5490
jmp 0x6aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x5490
jmp 0x6ad7
movq -0x30(%rbp), %rax
movsbq (%rax), %rdi
leaq 0x2747(%rip), %rsi      # 0x911d
movl $0x1, %edx
callq 0x51f0
cmpl $0x0, %eax
jne 0x6a85
movq -0x30(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x53, %eax
jne 0x6a85
movq -0x30(%rbp), %rax
movb 0x1(%rax), %cl
movb %cl, (%rax)
movq -0x30(%rbp), %rax
movb $0x0, 0x1(%rax)
movb $0x0, -0x32(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x33(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x57c0
movq -0x50(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x5770
jmp 0x6a37
leaq -0x33(%rbp), %rdi
callq 0x5490
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
je 0x6a57
movq -0x78(%rbp), %rdi
callq 0x5570
movb $0x1, -0x32(%rbp)
testb $0x1, -0x32(%rbp)
jne 0x6a83
jmp 0x6a7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x33(%rbp), %rdi
callq 0x5490
jmp 0x6ad7
movq -0x50(%rbp), %rdi
callq 0x5260
jmp 0x6aca
leaq -0x34(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x57c0
movq -0x50(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0x2673(%rip), %rsi      # 0x9114
callq 0x5770
jmp 0x6aa8
leaq -0x34(%rbp), %rdi
callq 0x5490
jmp 0x6aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x34(%rbp), %rdi
callq 0x5490
jmp 0x6ad7
movq -0x48(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x57a0