// File: /workspace/github_cpp_makefile_star2_O2/jgeumlek[P]moltengamepadctl/source/oscpkt/oscpkt.hh
// Function: oscpkt::Message::buildFromRawData(void const*, unsigned long)
void buildFromRawData(const void *ptr, size_t sz) {
    clear();
    storage.assign((const char*)ptr, (const char*)ptr + sz);
    const char *address_beg = storage.begin();
    const char *address_end = (const char*)memchr(address_beg, 0, storage.end()-address_beg);
    if (!address_end || !isZeroPaddingCorrect(address_end+1) || address_beg[0] != '/') { 
      OSCPKT_SET_ERR(MALFORMED_ADDRESS_PATTERN); return; 
    } else address.assign(address_beg, address_end);

    const char *type_tags_beg = ceil4(address_end+1);
    const char *type_tags_end = (const char*)memchr(type_tags_beg, 0, storage.end()-type_tags_beg);
    if (!type_tags_end || !isZeroPaddingCorrect(type_tags_end+1) || type_tags_beg[0] != ',') { 
      OSCPKT_SET_ERR(MALFORMED_TYPE_TAGS); return; 
    } else type_tags.assign(type_tags_beg+1, type_tags_end); // we do not copy the initial ','

    const char *arg = ceil4(type_tags_end+1); assert(arg <= storage.end()); 
    size_t iarg = 0;
    while (isOk() && iarg < type_tags.size()) {
      assert(arg <= storage.end()); 
      size_t len = getArgSize(type_tags[iarg], arg);
      if (isOk()) arguments.push_back(std::make_pair(arg - storage.begin(), len));
      arg += ceil4(len); ++iarg;
    }
    if (iarg < type_tags.size() || arg != storage.end()) {
      OSCPKT_SET_ERR(MALFORMED_ARGUMENTS);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x394c
leaq 0x60(%rbx), %rdi
addq %r15, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x46ac
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rdx
xorl %r14d, %r14d
subq %rax, %rdx
cmovneq %rax, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x2260
testq %rax, %rax
je 0x4475
movq %rax, %r12
leaq 0x1(%rax), %r15
movq %r15, %rdi
callq 0x4510
testb %al, %al
je 0x4475
cmpb $0x2f, (%r14)
jne 0x4475
leaq 0x8(%rbx), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4530
addq $0x3, %r15
andq $-0x4, %r15
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
xorl %edx, %edx
subq %rax, %rcx
cmovneq %rax, %rdx
addq %rcx, %rdx
subq %r15, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2260
testq %rax, %rax
je 0x4484
movq %rax, %r12
leaq 0x1(%rax), %r14
movq %r14, %rdi
callq 0x4510
testb %al, %al
je 0x4484
cmpb $0x2c, (%r15)
jne 0x4484
leaq 0x28(%rbx), %rdi
incq %r15
movq %r15, %rsi
movq %r12, %rdx
callq 0x4530
addq $0x3, %r14
andq $-0x4, %r14
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
xorl %edx, %edx
subq %rax, %rcx
cmovneq %rax, %rdx
leaq (%rdx,%rcx), %rax
cmpq %r14, %rax
jb 0x44f1
leaq 0x48(%rbx), %r15
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movl 0x78(%rbx), %eax
movq 0x30(%rbx), %rcx
testl %eax, %eax
jne 0x44a0
cmpq %rcx, %rbp
jae 0x44a0
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rcx
subq %rax, %rcx
movl $0x0, %edx
cmovneq %rax, %rdx
leaq (%rdx,%rcx), %rax
cmpq %rax, %r14
ja 0x44d2
movq 0x28(%rbx), %rax
movsbl (%rax,%rbp), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4546
movq %rax, %r13
cmpl $0x0, 0x78(%rbx)
jne 0x4462
movq 0x60(%rbx), %rax
cmpq %rax, 0x68(%rbx)
movl $0x0, %ecx
cmovneq %rax, %rcx
movq %r14, %rax
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x3c0e
addq $0x3, %r13
andq $-0x4, %r13
addq %r13, %r14
incq %rbp
jmp 0x43e1
cmpl $0x0, 0x78(%rbx)
jne 0x4491
movl $0x1, 0x78(%rbx)
jmp 0x4491
cmpl $0x0, 0x78(%rbx)
jne 0x4491
movl $0x2, 0x78(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %rcx, %rbp
jae 0x44ab
testl %eax, %eax
jne 0x4491
jmp 0x44c9
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rcx
xorl %edx, %edx
subq %rsi, %rcx
cmovneq %rsi, %rdx
testl %eax, %eax
jne 0x4491
leaq (%rdx,%rcx), %rax
cmpq %rax, %r14
je 0x4491
movl $0x3, 0x78(%rbx)
jmp 0x4491
leaq 0xed1(%rip), %rdi       # 0x53aa
leaq 0xdd1(%rip), %rsi       # 0x52b1
leaq 0xed8(%rip), %rcx       # 0x53bf
movl $0x17e, %edx            # imm = 0x17E
callq 0x2170
leaq 0xeb2(%rip), %rdi       # 0x53aa
leaq 0xdb2(%rip), %rsi       # 0x52b1
leaq 0xeb9(%rip), %rcx       # 0x53bf
movl $0x17b, %edx            # imm = 0x17B
callq 0x2170